[cs631apue] How to handle HTTP version

Jan Schaumann jschauma at stevens.edu
Wed Dec 2 20:52:44 EST 2015


Xiakun Lu <xlu9 at stevens.edu> wrote:
 
> According to the requirement, we only need to handle HTTP/1.0, My
> question is how to handle HTTP/1.1  HTTP/2.0, do we response 400 bad
> request, or treat it as HTTP/1.0. And how about a bad version
> BACON/3.2?

If the RFC does not specify the behaviour, then you may choose a
reasonable course of action.

One can argue either way for sending a 400 or 505 response or using
Postel's law and pretend a client will be able to grok a standard
HTTP/1.0 response.

If you encounter other cases where it's unclear what to do, please make
sure to note in your README how you decided.

-Jan


More information about the cs631apue mailing list