[BUG][FIX] HTTPSocket>>httpGet: and redirecting without host names

willem van den ende squeak at willemvandenende.com
Wed Jan 12 08:23:51 UTC 2005


On Tuesday 11 January 2005 18:21, Avi Bryant wrote:
> On Tue, 11 Jan 2005 11:41:24 -0500, Ben Schroeder <bschroeder at procro.com> 
wrote:
> > However, #httpGet: was failing on redirects that gave the new location
> > as a full path with no host name, such as '/some/file'. (Seaside - at
> > least while running on Komanche but possibly elsewhere - issues
> > redirects like this.)
>
> Just fyi - if you fill in a hostname on the Seaside config page, it
> will use absolute URLs for its redirects and elsewhere.  

> Technically, 
> I believe, relative redirects are not legal in HTTP, 

That is correct, the http 1.1. spec (I was just reading it yesterday) says 
about the location field (used for amongst other things redirects):

http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30

"The field value consists of a single absolute URI.

       Location       = "Location" ":" absoluteURI

An example is:

       Location: http://www.w3.org/pub/WWW/People.html"

kind regards,

-- 
Willem van den Ende
weblog: http://ruminations.willemvandenende.com


> although most 
> browsers do handle them just fine.
>
> Avi




More information about the Squeak-dev mailing list