[80] in 6.033-lab

home help back first fref pref prev next nref lref last post

HTTP version handling

daemon@ATHENA.MIT.EDU (Kevin 'Bob' Fu)
Sun Mar 15 16:37:27 1998

To: amaywah@MIT.EDU
Cc: 6.033-lab@MIT.EDU
In-Reply-To: Your message of Sun, 15 Mar 1998 04:45:25 -0500.
             <199803150945.EAA24937@w20-575-22.MIT.EDU> 
Date: Sun, 15 Mar 1998 16:37:31 EST
From: "Kevin 'Bob' Fu" <fubob@MIT.EDU>

>Let's say a client requests:
>
>"GET http://web.mit.edu/ HTTP/9.5"
>
>instead of:
>
>"GET http://web.mit.edu/ HTTP/1.0"
>
>Should I immediately send an error messsage to the client?
>Or should I just pass it along to the server and give the client
>the server's response to that?
>
>Andrew

RFC 2145 (one of the references in the web proxy doc) says:

2.1 Proxy behavior

...

   We remind the reader that that HTTP version numbers are hop-by-hop
   components of HTTP messages, and are not end-to-end.  That is, an
   HTTP proxy never "forwards" an HTTP version number in either a
   request or response.

And RFC 1945 says:

   Proxy and gateway applications must be careful in forwarding requests
   that are received in a format different than that of the
   application's native HTTP version. Since the protocol version
   indicates the protocol capability of the sender, a proxy/gateway must
   never send a message with a version indicator which is greater than
   its native version; if a higher version request is received, the
   proxy/gateway must either downgrade the request version or respond
   with an error. Requests with a version lower than that of the
   application's native format may be upgraded before being forwarded;
   the proxy/gateway's response to that request must follow the server
   requirements listed above.

In other words, the proxy should either respond with an error for
HTTP/9.5, or downgrade the version number to HTTP/1.0 when requesting
the data from a web server.

--------
Kevin E. Fu (fubob@mit.edu)
PGP key: finger fubob@monk.mit.edu

home help back first fref pref prev next nref lref last post