httphttp-1.1http-1.0

Is using HTTP 1.0 bad practice?


I'm implementing a basic http client for communicating with a web service and am wondering if I should go with http 1.0 or 1.1. The data section will consist of binary data and the remote server will always be controlled by me (running IIS7.5). The firewalls / proxies inbetween is nothing I'm controlling, ie. the packets must not be stopped if wrong http version is used.

I've been reading up about the difference between http 1.0 and 1.1 and it seems to me that http 1.0 supports everything I need.

Will I encounter problems if i choose http 1.0 over 1.1 or can I assume that everything will work just as good?

What makes me wonder is that if I connect via raw sockets to IIS7.5 and send a http 1.0 get request, the response is always http 1.1.


Solution

  • A firewall certainly will not block it and a router will route it.

    I would suggest using HTTP 1.1. Chances are nothing will be affected if you use HTTP 1.0. However, you never know who else might use your HTTP client in the future and what horrible server implementation it will be used with.

    You also need to ask yourself why you are implementing an HTTP client in the first place. Why not just use a standard library? I do not know what language you are using, but libcurl has bindings for many languages.

    You can see more about libcurl here.