mirror of
https://github.com/kiwix/kiwix-tools.git
synced 2025-09-22 11:22:38 -04:00
Correctly handle NULL string for request arguments.
When iterating over arguments of a request, the value can be a null pointer if the argument is provided without a `=`. https://www.gnu.org/software/libmicrohttpd/manual/html_node/microhttpd_002drequests.html We have to handle this correctly. Should fix #116.
This commit is contained in:
parent
9a29874f9f
commit
9eaf512bf9
@ -122,7 +122,7 @@ int RequestContext::fill_argument(void *__this, enum MHD_ValueKind kind,
|
||||
const char *key, const char* value)
|
||||
{
|
||||
RequestContext *_this = static_cast<RequestContext*>(__this);
|
||||
_this->arguments[key] = value;
|
||||
_this->arguments[key] = value == nullptr ? "" : value;
|
||||
return MHD_YES;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user