Gopher: initial request handling.

This commit is contained in:
antirez
2019-02-21 23:13:08 +01:00
parent 3de9ccf190
commit e00b22e090
4 changed files with 84 additions and 1 deletions

View File

@ -1564,6 +1564,14 @@ void processInputBuffer(client *c) {
if (c->reqtype == PROTO_REQ_INLINE) {
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)) {
processGopherRequest(c);
resetClient(c);
c->flags |= CLIENT_CLOSE_AFTER_REPLY;
break;
}
} else if (c->reqtype == PROTO_REQ_MULTIBULK) {
if (processMultibulkBuffer(c) != C_OK) break;
} else {