mirror of
https://libwebsockets.org/repo/libwebsockets
synced 2025-08-25 17:50:33 +00:00
Subject: [PATCH] Fix cgi QUERY_STRING key only field truncated
A request like 'http://host?abc' set the QUERY_STRING variable for CGIs to "ab" instead of "abc". This was because the code didn't account for key-only fields, only for key-value ones.
This commit is contained in:
parent
bfef74671a
commit
9a9ab2865b
1 changed files with 1 additions and 1 deletions
|
@ -257,7 +257,7 @@ lws_cgi_via_info(struct lws_cgi_info * cgiinfo)
|
|||
if (*t == '=')
|
||||
*p++ = *t++;
|
||||
i = urlencode(t, i - lws_ptr_diff(t, tok), p, lws_ptr_diff(end, p));
|
||||
if (i > 0) {
|
||||
if (i >= 0) {
|
||||
p += i;
|
||||
*p++ = '&';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue