mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Remove query params.
Reported by: James Antill https://bugzilla.redhat.com/show_bug.cgi?id=1099199
This commit is contained in:
@@ -27,6 +27,7 @@ test(const char *input, const char *expected)
|
||||
}
|
||||
|
||||
static char const *tests[] = {
|
||||
"", NULL,
|
||||
"/", "/",
|
||||
"/.", "/",
|
||||
"/./", "/",
|
||||
@@ -48,6 +49,11 @@ static char const *tests[] = {
|
||||
"/a/b/../../../c", NULL,
|
||||
/* don't forget consolidate_slashes */
|
||||
"//a///b////c/////", "/a/b/c/",
|
||||
/* strip query params */
|
||||
"/?a=b", "/",
|
||||
"/index.html?", "/index.html",
|
||||
"/index.html?a", "/index.html",
|
||||
"/index.html?a=b", "/index.html",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user