From 6fa04fbd92a77f2b1c3b7e663c6ab747bdcfb26d Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Mon, 11 Nov 2019 02:57:09 +0100 Subject: [PATCH] Fixed HTTP-client query-string handling bug. --- common/http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/http.c b/common/http.c index 3ac3b14..77799a3 100644 --- a/common/http.c +++ b/common/http.c @@ -224,8 +224,8 @@ static void consreq(struct htconn *cn) } if(*(cn->url->query)) { addtobuf(cn->outbuf, '?'); - for(p = cn->url->path; *p; p++) { - if(!(*p & 0x80) && (safechars[(int)*p] || (*p == '&'))) + for(p = cn->url->query; *p; p++) { + if(!(*p & 0x80) && (safechars[(int)*p] || (*p == '&') || (*p == '='))) addtobuf(cn->outbuf, *p); else bprintf(cn->outbuf, "%%%02X", *p); -- 2.11.0