[erlang-questions] Inets unencoding question
Ingela Anderton
ingela@REDACTED
Thu Oct 26 10:03:27 CEST 2006
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
More information about the erlang-questions
mailing list