diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2020-01-01 15:28:43 -0500 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2020-01-26 00:41:05 -0500 |
commit | 9cdfb4846653253f2c11dd74964eb4a9bc006a2c (patch) | |
tree | 08a7c88c45462624f96a42ca459b1444bda6d815 /src/t/test_burl.c | |
parent | aaccb1bc5e85c3f9bb4e1f0891002703699f8854 (diff) | |
download | lighttpd-git-9cdfb4846653253f2c11dd74964eb4a9bc006a2c.tar.gz |
[core] preserve %2b and %2B in query string (fixes #2999)
normalize %2b or %2B in query string to %2B (uppercase hex),
and not to '+'
(thx int-e)
x-ref:
"url-normalize-required expands %2B in query strings"
https://redmine.lighttpd.net/issues/2999
Diffstat (limited to 'src/t/test_burl.c')
-rw-r--r-- | src/t/test_burl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/t/test_burl.c b/src/t/test_burl.c index e9cc80de..c2bbe69e 100644 --- a/src/t/test_burl.c +++ b/src/t/test_burl.c @@ -78,6 +78,8 @@ static void test_burl_normalize (void) { run_burl_normalize(psrc, ptmp, flags, __LINE__, CONST_STR_LEN("/%2B"), CONST_STR_LEN("/+")); run_burl_normalize(psrc, ptmp, flags, __LINE__, CONST_STR_LEN("/%3a"), CONST_STR_LEN("/:")); run_burl_normalize(psrc, ptmp, flags, __LINE__, CONST_STR_LEN("/%3A"), CONST_STR_LEN("/:")); + run_burl_normalize(psrc, ptmp, flags, __LINE__, CONST_STR_LEN("/%2b?x=%2b"), CONST_STR_LEN("/+?x=%2B")); + run_burl_normalize(psrc, ptmp, flags, __LINE__, CONST_STR_LEN("/%2B?x=%2B"), CONST_STR_LEN("/+?x=%2B")); run_burl_normalize(psrc, ptmp, flags, __LINE__, CONST_STR_LEN("/~test%20รค_"), CONST_STR_LEN("/~test%20%C3%A4_")); run_burl_normalize(psrc, ptmp, flags, __LINE__, CONST_STR_LEN("/\375"), "", (size_t)-2); run_burl_normalize(psrc, ptmp, flags, __LINE__, CONST_STR_LEN("/\376"), "", (size_t)-2); |