From 366cb1e744ae916a6cb2409bb3cfe359a5b03a4a Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 8 May 2020 01:18:06 +0200 Subject: skip query parameters when parsing file name --- hittpd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hittpd.c b/hittpd.c index 40c81a3..daf2c1f 100644 --- a/hittpd.c +++ b/hittpd.c @@ -498,6 +498,8 @@ on_message_complete(http_parser *p) { } else if (s[i] == 0) { send_error(p, 400, "Bad Request"); return 0; + } else if (s[i] == '?') { + break; } else { *t++ = s[i]; } -- cgit 1.4.1