[erlang-questions] Inets unencoding question
Brad Marshall
brad@REDACTED
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:
http://www.somedomain.com/%2Eabc
arrives as: http://www.somedomain.com/.abc
This example is double-unencoded:
http://www.somedomain.com/%252Eabc
arrives as: http://www.somedomain.com/.abc
This example causes the parser to error out:
http://www.somedomain.com/%25abc
Thanks,
brad
--------- Original Message --------
From: ingela@REDACTED
To: erlang-questions@REDACTED <erlang-questions@REDACTED>
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
parsing.
> >I.e. %25 becomes %. Unfortunately, the web service I'm calling
requires a
> >digital signature with the request, so the request no longer matches
the
> >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
this
> >request in other http clients (Perl, Java) and neither performs an
unencode.
> > Also, this particular implementation seems to violate the RFC whereby
> >multiple unencoding is not allowed as it may alter the intent of the
URI
> >(the http_uri:parse_http unencoding is recursing on the unencoded
portion).
>
> >Given my very light Erlang skills it's entirely possible I'm
> >mis-interpreting the processing but my tests seem to bear this out.
Can
> >anyone confirm or deny? Or suggest a means of turning this off? Or
explain
> >why this is correct?
>
> --
> Ingela
>
> Ericsson AB - OTP team
>
>
>
>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
>
________________________________________________
Message sent using UebiMiau 2.7.9
More information about the erlang-questions
mailing list