[vlc-commits] commit: Plus sign must not be decoded in URI ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sat Jul 24 11:07:25 CEST 2010


vlc/vlc-1.1 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jul 24 12:06:28 2010 +0300| [c7cc7c255808360524281bb8dd3fb460ad3d9be3] | committer: Rémi Denis-Courmont 

Plus sign must not be decoded in URI

This is different from HTTP forms.
(cherry picked from commit d2dd502e0a2709f52be26548a3deda5b08db8bb6)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=c7cc7c255808360524281bb8dd3fb460ad3d9be3
---

 src/test/url.c     |    5 +----
 src/text/strings.c |    4 ----
 2 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/src/test/url.c b/src/test/url.c
index 80f564f..a5742df 100644
--- a/src/test/url.c
+++ b/src/test/url.c
@@ -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 */
diff --git a/src/text/strings.c b/src/text/strings.c
index 602f8d5..23391d2 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -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 */



More information about the vlc-commits mailing list