[erlang-questions] Inets unencoding question

Brad Marshall <>
Thu Oct 26 19:31:07 CEST 2006

Sorry, should have included my test cases in the explanation.

This example should be sent as-is, but arrives unencoded:
arrives as: http://www.somedomain.com/.abc

This example is double-unencoded:
arrives as: http://www.somedomain.com/.abc

This example causes the parser to error out:


--------- Original Message --------
To:  <>
Subject: Re: [erlang-questions] Inets unencoding question
Date: 26/10/06 04:10

> Hi!
> The implementation of the http_uri module has always been a mystery to
> me. It is probably wrong. That is why I wrote a new one when I was
> going to fix the problem that it did not handle URIs with ipv6
> addresses. The new version will be part of the next open source release. 
> When I try to test the old module however it seems
> that % becomes %25 not the other way around. Regardless if
> you could send an exampel of an uri that you think is handle
> incorrectly I will add it to our test cases of this module. 
> >I'm using http:request and it calls http_uri:parse_http.  
> >Http_uri:parse_http seems to unencode the request as part of its
> >I.e. %25 becomes %.  Unfortunately, the web service I'm calling
requires a
> >digital signature with the request, so the request no longer matches
> >digital signature.
> >I'm not sure of the reasoning behind this, and I'm certainly open to
> >discussion to the contrary, but this seems like a bug.  I've tried
> >request in other http clients (Perl, Java) and neither performs an
> > Also, this particular implementation seems to violate the RFC whereby
> >multiple unencoding is not allowed as it may alter the intent of the
> >(the http_uri:parse_http unencoding is recursing on the unencoded
> >Given my very light Erlang skills it's entirely possible I'm
> >mis-interpreting the processing but my tests seem to bear this out. 
> >anyone confirm or deny?  Or suggest a means of turning this off?  Or
> >why this is correct?
> -- 
> Ingela
> Ericsson AB - OTP team
> _______________________________________________
> erlang-questions mailing list
> http://www.erlang.org/mailman/listinfo/erlang-questions

Message sent using UebiMiau 2.7.9

More information about the erlang-questions mailing list