Lex Spoon wrote:
>
> In fact Squeak appears to be doing it mostly right, so let's be careful.
> Note: When automatically redirecting a POST request after
> receiving a 301 status code, some existing HTTP/1.0 user agents
> will erroneously change it into a GET request.
Oh, I didn't read this one, in fact I only looked at the 302 definition,
that's what I get back from our servers here (which is wrong in the first
place, see below).
> If the 301 status code is received in response to a request other
> than GET or HEAD, the user agent MUST NOT automatically redirect the
...
> Thus you're supposed to ask the user before redirecting a POST. I've
> never seen such a query out of Netscape, but Lynx seems to go along with
That's valid for the 302 as well. I decided to emulate the "standard" browser
behavior.
> http://www.crl.com/~subir/lynx/why.html
Interesting, thanks fo this link!
>
> Finally, the RFC does provide a specific method for redirect-using-GET,
> and that is response code 303. Here that one case that Squeak gets
Yeah! I mentioned this to our web engineers here, but, you know, I'm only
the Squeaker ;-)
>
> PS -- a tangential issue is the manner that HTTP errors are handled in
> Squeak right now. Currently, an error results either in a debugger or
...
> PPS -- as another tangential issue, there should probably be a
> HTTPRequest object that accumulates parameters, instead of having one
YES!!
I must confess, on several occasion I was really tempted to rewrite this
whole thing. Having the protocols implemented in subclasses of socket is a
related problem. I looked into implementing the Socks protocol and things
started to look really messy.
In fact I changed the error handling a bit, but didn't post it to the list.
Michael
--
"To improve is to change, to be perfect is to change often."
Winston Churchill
+------------------------------------------------------------+
| Michael Rueger |
| Phone: ++1 (818) 623 3283 Fax: ++1 (818) 623 3559 |
+---------- [EMAIL PROTECTED] ------------------+