Can't access www.squeaksource.com from Squeak

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't access www.squeaksource.com from Squeak

Hans-Martin Mosner
Hello,
I just noticed (when accessing squeaksource.com from the Monticello
browser in a trunk image) that this does not work at all.
squeaksource.com replies with a "Location:" header that contains a path
name, but that does not work with HTTPSocket at all.
HTTP 1.1 defines that Location must be an absolute URI, so
squeaksource.com is clearly violating the specs, but browser seem to
handle the Location header just fine.

One side or the other should fix this. I would prefer if squeaksource
would conform to the standard...

Cheers,
Hans-Martin

Reply | Threaded
Open this post in threaded view
|

Re: Can't access www.squeaksource.com from Squeak

Andreas.Raab
On 3/25/2010 2:43 PM, Hans-Martin Mosner wrote:
> HTTP 1.1 defines that Location must be an absolute URI, so
> squeaksource.com is clearly violating the specs, but browser seem to
> handle the Location header just fine.

Welcome to the real world. *Nobody* respects that rule :-)
Here is what we do:

        "Grab the url and retry. Note that although the HTTP spec says that the
        location header contains 'a single absolute URI' we've found that some
        places use a relative URI instead (and are therefore in violation of
the spec).
        Since asUrlRelativeTo: deals with absolute URLs too, that's not a problem."
        url := (header copyAfter: $:) withBlanksTrimmed asUrlRelativeTo: url.


Cheers,
   - Andreas