in reply to Re: read aka fread(3) broken, sysread aka read(2) works IIS socket
in thread read aka fread(3) broken, sysread aka read(2) works IIS socket

Using the "Host:" header with HTTP/1.0 is acceptable. Web servers that supports virtual hosts almost always support it. Ancient web servers that don't support virtual hosts will usually just ignore the header. It is safest to always include the "Host" header with HTTP/1.0 requests.

More importantly, the HTTP/1.1 protocol has requirements for clients that manual scripts aren't willing to do. For example, HTTP/1.1 clients must support chunked encoding. And handle persistent connections gracefully. Clients don't want a persistent connection should send "Connection: close" header.

  • Comment on Re: Re: read aka fread(3) broken, sysread aka read(2) works IIS socket