Rudolph van Graan rvg@REDACTED
Wed Sep 3 13:43:05 CEST 2003

Hi all,

Today I have a question regarding the support of the http module in
inets. I've recently had to write an application that uses http to
retrieve some information. I found some issues with the way the code
deals with a) Microsoft IIS redirects [a known issue] and b) handling of
spaces in GET parameters. I've mailed the author of http requestion help
building a patch to address these issues, but to date I had no response.
So, how does one report bugs on http and how can I submit possible
fixes? I couldn't find any reference in the code to standard unit tests,
so I don't know if my patch broke anything. Does someone know of tests
written for http? 

Issue 1:

The first issue has to do with the comments at the top of the http.erl

%% Note:
%% - Some servers (e.g. Microsoft-IIS/5.0) may sometimes not return a
%%   'Location' header on a redirect.
%%   The client will fail with {error,no_scheme} in these cases.

Suppose the url one is trying to fetch is
"" and it tries to redirect to "blie.asp"
on the same server, the Location header field contains "blie.asp"
instead of "http://some.server.asp/blie.asp". Is this correct? I've
found that when an IIS 5.0 server redirects, it does not expand the URL
back to its complete form. I *have* to get http.erl to work properly
with someone else's website, so I've started at trying to fix this
problem [by letting httpc_handler.erl] fix the Location when it is in
this state. I've built a simple fix, but I cannot regression test it
using the unittests for the module, nor do I know how to include this in
the actual erlang distribution.

Issue 2:

The other problem has to do with a URL that looks like this

The %20 means a space in the data. Now, http "prepares" the url and then
change the %20 into a space, so the actual 
URL requested from the Web server is
" Text" which clearly is not
properly formed. I feel that the code should in fact change any embedded
spaces into the hex version, but not change embedded hex characters back
to the actual form.

Any suggestions?

Thank you for all the help in the past.



More information about the erlang-questions mailing list