Remove query params.

Reported by: James Antill
https://bugzilla.redhat.com/show_bug.cgi?id=1099199
This commit is contained in:
Emil Mikulic
2014-05-26 21:36:29 +10:00
parent 5854227fc7
commit e8a38f9c6a
3 changed files with 24 additions and 3 deletions

View File

@@ -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
};