
Does News.YC form submission break in Safari for you? - aston

======
pg
The problem is with redirects. For some reason, early versions of Safari (pre
2) don't follow our redirects.

The simplest reproduction of the problem is:

<http://news.ycombinator.com/safaritest>

which redirects to apple.com in other browsers but generates an error in early
versions of Safari.

I'd be very grateful if any Safari expert out there could tell me what's going
wrong.

~~~
pg
Problem solved. The source of the trouble is that early versions of Safari
insist on a blank line after the Location header in a redirect. Thanks to
Trevor Blackwell for proposing this.

In the latest release, everything seems to work, at least in Safari 1.3.

------
aston
Every time I submit (story/comment) or delete, the /r page comes back as "This
page can't be found" in Safari. All of the POSTs are submitting, I just don't
get results back. Dunno if it's just me.

~~~
pg
Yeah, looks like there is some kind of problem. It looks like some arguments
(specifically the fnid argument) may not be getting sent to the server in form
submissions, though Firefox and Explorer do send this argument. Any Safari
experts have any idea what might be going on?

Edit: The args arrive fine. The prob may be with the redirect after the form
submission. The main difference I see in requests from Firefox and Safari is
that F says Connection: keep-alive and S says Connection: close.

Edit 2: The prob is with redirects, not forms. But I'm not sure why, and it
doesn't happen in more recent versions of Safari.

~~~
ralph
Never used Safari. I've examined the network packets though and there's some
non-standard stuff going on when using Firefox.

HTTP/1.0 302 Moved

Date: Fri, 15 Jun 2007 15:40:40 GMT

Location: item?id=28352

The Location header should have an absolute URI:
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30>

Also, you're using a 302 response to a POST request which, strictly speaking,
means the browser should re-do the POST to the new URI in the Location header.
Many don't, they do a GET instead. The 303 response can be used to say you
insist they GET the new URI despite the original being a POST.
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.3>

Just noticed you're using HTTP/1.0. I've referred you to 1.1. You may wish to
switch.

------
mattjaynes
News.YC doesn't work in standard text-based browsers either at the moment.
(Granted, I doubt few folks [other than uber-cli guys] use these!)

When trying to login:

 _links_ produces a "Error reading from socket" error

and

 _lynx_ produces a "Post request without Content-Length." error

~~~
ralph
Here lynx warns me that the Location URI isn't absolute. Nice of it.

