[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:02 CEST 2010


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

Plus sign must not be decoded in URI

This is different from HTTP forms.

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

 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 39b101d..4dcb0d4 100644
--- a/src/test/url.c
+++ b/src/test/url.c
@@ -95,9 +95,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!");
 
@@ -109,7 +106,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 25886ff..fa1b39c 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