From 7bf58c1d01706e4bd71779d2168f81e436a4773b Mon Sep 17 00:00:00 2001 From: lxsang Date: Fri, 19 Aug 2022 17:57:45 +0200 Subject: [PATCH] save the entire post request body to request --- build.json | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ http_server.c | 3 +-- 2 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 build.json diff --git a/build.json b/build.json new file mode 100644 index 0000000..019b22f --- /dev/null +++ b/build.json @@ -0,0 +1,73 @@ +{ + "name": "ant-http", + "targets":{ + "configure": { + "require": ["linux"], + "jobs": [ + { + "name": "linux-exec", + "data": { + "cmd":"libtoolize", + "pwd": "home://workspace/ant-http" + } + }, + { + "name": "linux-exec", + "data": { + "cmd":"aclocal", + "pwd": "home://workspace/ant-http" + } + }, + { + "name": "linux-exec", + "data": { + "cmd":"autoconf", + "pwd": "home://workspace/ant-http" + } + }, + { + "name": "linux-exec", + "data": { + "cmd":"automake --add-missing", + "pwd": "home://workspace/ant-http" + } + }, + { + "name": "linux-exec", + "data": { + "cmd":"./configure --prefix=/usr --enable-debug=no", + "pwd": "home://workspace/ant-http" + } + } + ] + }, + "clean": { + "require": ["linux"], + "jobs": [ + { + "name": "linux-exec", + "data": { + "cmd":"make clean", + "pwd": "home://workspace/ant-http" + } + } + ] + }, + "build": { + "require": ["linux"], + "jobs": [ + { + "name": "linux-exec", + "data": { + "cmd":"make", + "pwd": "home://workspace/ant-http" + } + } + ] + }, + "clean and build": { + "depend": ["clean", "build"], + "jobs": [] + } + } +} \ No newline at end of file diff --git a/http_server.c b/http_server.c index 70386c2..1c866a7 100644 --- a/http_server.c +++ b/http_server.c @@ -1228,8 +1228,7 @@ void *decode_post_request(void *data) key = ctype; if (pquery) { - dput(request, key, strdup(pquery)); - free(pquery); + dput(request, key, pquery); } else if (clen > 0) {