[erlang-bugs] http client relative redirects
Thu Sep 6 05:03:27 CEST 2007
(As you probably already know) the RFC does state that Location: headers
are supposed to be absolute
But IMHO I still think it would be a good idea to try and handle this.
On Mon, 3 Sep 2007, Paul Mineiro wrote:
> 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.
> The server is handing back a relative url in the location header:
> % telnet yexsely.spaces.live.com 80
> Trying 220.127.116.11...
> 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>
> 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 .
> -- p
"A hot dog and bun, you have to have a style and strategy that's
different from a chicken wing, which is different from a matzo ball,"
he says. "Athletics are not really about superior fitness. They're about
superior refinement of skill. That's what Babe Ruth did. That's what
More information about the erlang-bugs