[cs631apue] HTTP 1.1 request fallback?

Jan Schaumann jschauma at stevens.edu
Sun Nov 24 16:34:37 EST 2013


Paul-Anthony Dudzinski <pdudzins at stevens.edu> wrote:
> If the request is valid and HTTP/1.1 you should respond 505. Otherwise you
> should respond with 400 for a bad request or 408 if the request times out.
> SO assuming index.html exists
> 
> GET /index.html HTTP/1.0 --> 200 OK
> GET /index.html HTTP/1.1 --> 505 Version Not supported
> xxxxxxxxxxxxxxxxxxxxxxx /index.html HTTP/1.1 --> 400 Bad Request

Agreed.  The problem with accepting protocol versions higher than what
you actually support is that the client may send and expect data that
you are simply not honoring.

For example, HTTP/2.0 will technically require the use of TLS
(http://lists.w3.org/Archives/Public/ietf-http-wg/2013OctDec/0625.html),
and not honoring that has some rather important implications.

It's not possible to be forward-compatible with future versions of a
protocol, so let's be strict here and return 505.

-Jan


More information about the cs631apue mailing list