Sat, 29 Mar 08

Files hosted on Google Groups cannot be opened in Safari (or Internet Explorer)

I noticed a little while ago that opening a, Google Groups hosted, file in Safari didn’t work. I have a file at that you can try out if you’re so inclined. Requests for that file result in a page being rendered in Firefox but not in Safari or Internet Explorer (6 at least). James noticed that requests for these hosted files were resulting in a 302 response, as we can see from this curl output.

curl "" -v -X"HEAD"

< HTTP/1.1 302 Moved Temporarily
< Content-Type: text/html; charset=UTF-8
< Content-Length: 0
< Cache-control: private
< Server: GFE/1.3
< Date: Fri, 28 Mar 2008 19:55:58 GMT

The response also includes a body that contains a link to the actual file you want with some kind of key in the querystring. Interestingly the response doesn’t return a Location header.

The HTTP specification states the following:

The temporary URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI (s).

So, it looks like Google are sending a valid response according to the spec (although I’m not sure whether they’re intentionally leaving the Location header out) but that Safari and Internet Explorer are unable to deal with it.

I found an existing report of the bug over at the webkit bug tracker and added this information to it. I also sent a message to the Google Groups: Is Something Broken group.