The following commit has been merged in the master branch: commit d05529adf7016503e7c9d933e5d4d2972d31c21a Author: Stephane Glondu <st...@glondu.net> Date: Thu Jul 7 16:46:01 2011 +0200
Fix wrong decoding of + in URL paths diff --git a/debian/patches/0002-Fix-wrong-decoding-of-in-URL-paths.patch b/debian/patches/0002-Fix-wrong-decoding-of-in-URL-paths.patch new file mode 100644 index 0000000..77198fc --- /dev/null +++ b/debian/patches/0002-Fix-wrong-decoding-of-in-URL-paths.patch @@ -0,0 +1,46 @@ +From: Stephane Glondu <st...@glondu.net> +Date: Thu, 7 Jul 2011 16:47:00 +0200 +Subject: Fix wrong decoding of + in URL paths + +Cherry-picked from upstream. +--- + baselib/ocsigen_lib.ml | 11 +++++++++-- + 1 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/baselib/ocsigen_lib.ml b/baselib/ocsigen_lib.ml +index 376fe3a..15af400 100644 +--- a/baselib/ocsigen_lib.ml ++++ b/baselib/ocsigen_lib.ml +@@ -509,7 +509,8 @@ let string_of_url_path ~encode l = + then + fixup_url_string (String.concat "/" + (List.map (*Netencoding.Url.encode*) +- MyUrl.encode l)) ++ (MyUrl.encode ~plus:false) l)) ++ (* ' ' are not encoded to '+' in paths *) + else String.concat "/" l (* BYXXX : check illicit characters *) + + let parse_url = +@@ -561,6 +562,12 @@ let parse_url = + + (* Note that the fragment (string after #) is not sent by browsers *) + ++(*20110707 ' ' is encoded to '+' in queries, but not in paths. ++ Warning: if we write the URL manually, we must encode ' ' to '+' manually ++ (not done by the browser). ++ --Vincent ++*) ++ + let get_params = + lazy begin + let params_string = match query with None -> "" | Some s -> s in +@@ -570,7 +577,7 @@ let parse_url = + end + in + +- let path = List.map Netencoding.Url.decode (Neturl.split_path pathstring) in ++ let path = List.map (Netencoding.Url.decode ~plus:false) (Neturl.split_path pathstring) in + + let path = remove_dotdot path (* and remove "//" *) + (* here we remove .. from paths, as it is dangerous. +-- diff --git a/debian/patches/series b/debian/patches/series index 6a3af06..bc43ddc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0001-Disable-install-of-lwt_obrowser.patch +0002-Fix-wrong-decoding-of-in-URL-paths.patch -- ocsigen packaging _______________________________________________ Pkg-ocaml-maint-commits mailing list Pkg-ocaml-maint-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits