On Feb 19, 2005, at 11:02 AM, Arne Thomassen wrote:
But I disagree with your interpretation of the specification. 14.23
says
"port number [...] as obtained from the original URI", and 3.2.2 says
"If the port is empty or not given, port 80 is assumed". So the client
"obtained" the port number by "assuming" that the standard port is
meant.
3.2.2 talks about the URI definition for http. 14.23 specifies what
to put in the Host header field.
Additionally, 3.2.3 (URI comparison) says: "[...] octet-by-octet
comparison of the entire URIs, with these exceptions: A port that is
empty or not given is equivalent to the default port for that
URI-reference [...]". So the Apache httpd redirects to an *equivalent*
URI while the Location header field would only allow a redirection to
something "*other* than the Request-URI" (14.30). I read "equivalent"
to
mean "basically the same", not "other".
Unfortunately, many clients treat those URI as different, and thus
you will encounter some servers that are configured to redirect
to a single canonical form to reduce aliases (aliases have a negative
effect on cache performance and google ranking).
All this is why I originally implemented it this way. Maybe I
misinterpreted the spec. Should it be clarified with an erratum, or am
I
just completely unreasonable?
The latter -- the spec is clear, you are just reading beyond what
the text says. More examples would have been better.
As mentioned earlier, the problem only occurred with Apache httpd, not
with other server programs.
That's because Apache httpd is more configurable than other server
programs.
Also, you should be
sending HTTP/1.1 requests, not HTTP/1.0.
The client is able to do this, but I experienced problems with the
HTTP/1.1 implementation of some httpd servers. So the client uses
HTTP/1.0 by default nowadays, and users can configure it to use
HTTP/1.1
for servers where they want it.
That's bizarre. On all other browsers, HTTP/1.1 is both faster
and more robust than HTTP/1.0. And its been at least five years
since I've heard of a broken HTTP/1.1 origin server. Are you sure
that you aren't testing through a broken firewall or transparent
proxy? Microsoft complained about HTTP/1.1 until I pointed out
to them that their lame corporate firewall (Gauntlet) was changing
the data stream. They just never noticed it because HTTP/1.0
does not detect content errors.
....Roy