[erlang-bugs] http client relative redirects

Paul Mineiro <>
Mon Sep 3 21:13:16 CEST 2007


Dear maintainers,

Relative urls in redirects result in an unexpected (to me) error.

-------
% erl                                                  ~
Erlang (BEAM) emulator version 5.5.5 [source] [async-threads:0] [kernel-poll:false]

Eshell V5.5.5  (abort with ^G)
1> http:request ("http://yexsely.spaces.live.com/").

=INFO REPORT==== 3-Sep-2007::12:06:30 ===
The inets application was not started. Has now been started as a temporary application.
{error,no_scheme}
-------

The server is handing back a relative url in the location header:

-------
% telnet yexsely.spaces.live.com 80
Trying 207.46.123.236...
Connected to yexsely.spaces.live.com.
Escape character is '^]'.
GET / HTTP/1.1
Host: yexsely.spaces.live.com

HTTP/1.1 302 Found
Connection: close
Date: Mon, 03 Sep 2007 19:05:28 GMT
Server: Microsoft-IIS/6.0
P3P:CP="BUS CUR CONo FIN IVDo ONL OUR PHY SAMo TELo"
MSNSERVER: H: BY2SPCWEBA047 V: 1 D: 1/1/2000
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Location: /AccessDenied.aspx?space=yexsely
Set-Cookie: wlru=http%3a%2f%2fyexsely.spaces.live.com%2fdefault.aspx; domain=spaces.live.com; path=/
Cache-Control: private
Content-Type: text/html

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="/AccessDenied.aspx?space=yexsely">here</a>.</h2>
</body></html>
Connection closed by foreign host.
-------

I'm not sure what the RFC says, but my browser does a redirect treating
the ref as relative, i.e., to
http://yexsely.spaces.live.com/AccessDenied.aspx?space=yexsely .

Thanks,

-- p



More information about the erlang-bugs mailing list