diff options
| -rw-r--r-- | tools/server/server.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/server/server.c b/tools/server/server.c index 40b8e18..2bf7153 100644 --- a/tools/server/server.c +++ b/tools/server/server.c @@ -99,9 +99,10 @@ void dispatch_request(client *c) { j->c = c; snprintf(j->method, sizeof(j->method), "%s", c->req.method); snprintf(j->path, sizeof(j->path), "%s", c->req.path); - j->body = xstrndup(c->req.body ? c->req.body : "", c->req.body_len); + j->body = c->req.body; j->body_len = c->req.body_len; - j->auth = c->req.auth ? xstrdup(c->req.auth) : NULL; + c->req.body = NULL; + c->req.body_len = 0; j->created_ns = nstime(); client_incref(c); /* All requests go through the tokenizer thread. Tokenization must run on a |
