Commit c7cc7c25 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Plus sign must not be decoded in URI

This is different from HTTP forms.
(cherry picked from commit d2dd502e0a2709f52be26548a3deda5b08db8bb6)
parent e288b59b
......@@ -90,9 +90,6 @@ int main (void)
test_decode ("this_should_not_be_modified_1234",
"this_should_not_be_modified_1234");
test_decode ("This+should+be+modified+1234!",
"This should be modified 1234!");
test_decode ("This%20should%20be%20modified%201234!",
"This should be modified 1234!");
......@@ -104,7 +101,7 @@ int main (void)
test_decode ("%0000", "");
/* Non-ASCII tests */
test_decode ("T%C3%a9l%c3%A9vision+%e2%82%Ac", "Télévision €");
test_decode ("T%C3%a9l%c3%A9vision %e2%82%Ac", "Télévision €");
test_decode ("T%E9l%E9vision", "T\xe9l\xe9vision");
/* Base 64 tests */
......
......@@ -95,10 +95,6 @@ char *decode_URI( char *psz )
break;
}
case '+': /* This is HTTP forms, not URI decoding... */
*out++ = ' ';
break;
default:
/* Inserting non-ASCII or non-printable characters is unsafe,
* and no sane browser will send these unencoded */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment