From 75eb52872d4c19eb7988e33f173f2763322ae8ff Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 11 Oct 2019 15:27:47 +0300 Subject: Echo added + http_params fix. --- src/request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.3