Re: URL paths with %2F in them

Anil Madhavapeddy <[email protected]> Tue, 3 Mar 2009 03:14:58 +0000
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <[email protected]>
Incidentally, I'm temporarily working around this with this small  
patch to ocamlnet: http://tinyurl.com/dm8rvt
...and doing:

     let u = Nethttp.uripath_decode (cgi#url ()) in
     let url = Neturl.parse_url u in

so that the %2Fs are intercepted before the URL is parsed.  Not sure  
what other side-effects this might have though.

-anil

On 3 Mar 2009, at 02:33, Anil Madhavapeddy wrote:

> The netstring/nethttp.ml implementation of uripath_decode fails with
> an error if a %2F (the URL encoding for '/') is encountered in the
> query string.  e.g.
>
> Is there any reason to reject URLs with this or is it just not
> implemented/bug?  Several client libraries which encode URIs seem to
> do this replacement, and nethttpd fails against them.
>
> The trivial replacement of fixing uripath_decode runs into the issue
> that some other callers call split_path _before_ doing the URL decode,
> and so the resulting string isn't split correctly.  So the patch is a
> little larger than just fixing the one function, so I figured I'd
> check with the list first...
>
> -anil
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San  
> Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the  
> Enterprise
> -Strategies to boost innovation and cut costs with open source  
> participation
> -Receive a $600 discount off the registration fee with the source  
> code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Ocamlnet-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel
>


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H