diff options
author | Aleksey Veresov <aleksey@veresov.pro> | 2019-10-11 15:27:47 +0300 |
---|---|---|
committer | Aleksey Veresov <aleksey@veresov.pro> | 2019-10-11 15:27:47 +0300 |
commit | 75eb52872d4c19eb7988e33f173f2763322ae8ff (patch) | |
tree | 02675927996b1c609291c471f5f8fcc1064795c8 /src | |
parent | b0a358a5f2ee27c052c163606a20135f37761884 (diff) | |
download | magi-75eb52872d4c19eb7988e33f173f2763322ae8ff.tar magi-75eb52872d4c19eb7988e33f173f2763322ae8ff.tar.xz magi-75eb52872d4c19eb7988e33f173f2763322ae8ff.zip |
Echo added + http_params fix.
Diffstat (limited to 'src')
-rw-r--r-- | src/request.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/request.c b/src/request.c index 8da8975..aa2cd9b 100644 --- a/src/request.c +++ b/src/request.c @@ -117,9 +117,9 @@ static int cgi_http_env(struct magi_request *r) struct magi_param param; /* At least one '=' must be in *env, according to format. */ char *name_end = strchr(*env, '='); - param.name = str_alloc(name_end - *env); + param.name = str_alloc(name_end - *env - 5); if (param.name) { - memcpy(param.name, *env, name_end - *env); + memcpy(param.name, *env + 5, name_end - *env - 5); param.data = str_alloc(strlen(name_end + 1)); if (param.data) { strcpy(param.data, name_end + 1); |