Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
68c75f24
Commit
68c75f24
authored
Feb 27, 2019
by
antirez
Browse files
Gopher: reply in gopher mode only if argv[0] starts with slash.
As documented but never implemented.
parent
f311a529
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/networking.c
View file @
68c75f24
...
...
@@ -1550,7 +1550,10 @@ void processInputBuffer(client *c) {
if (processInlineBuffer(c) != C_OK) break;
/* If the Gopher mode and we got zero or one argument, process
* the request in Gopher mode. */
if
(
server
.
gopher_enabled
&&
(
c
->
argc
==
1
||
c
->
argc
==
0
))
{
if (server.gopher_enabled &&
((c->argc == 1 && ((char*)(c->argv[0]->ptr))[0] == '/') ||
c->argc == 0))
{
processGopherRequest(c);
resetClient(c);
c->flags |= CLIENT_CLOSE_AFTER_REPLY;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment