Commit 75b760a7 authored by antirez's avatar antirez
Browse files

Inline protocol improved to accept quoted strings.

parent 076c2623
......@@ -847,7 +847,7 @@ void resetClient(redisClient *c) {
int processInlineBuffer(redisClient *c) {
char *newline = strstr(c->querybuf,"\r\n");
int argc, j;
sds *argv;
sds *argv, aux;
size_t querylen;
/* Nothing to do without a \r\n */
......@@ -861,7 +861,9 @@ int processInlineBuffer(redisClient *c) {
/* Split the input buffer up to the \r\n */
querylen = newline-(c->querybuf);
argv = sdssplitlen(c->querybuf,querylen," ",1,&argc);
aux = sdsnewlen(c->querybuf,querylen);
argv = sdssplitargs(aux,&argc);
sdsfree(aux);
/* Leave data after the first line of the query in the buffer */
c->querybuf = sdsrange(c->querybuf,querylen+2,-1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment