Johannes Froemter <[EMAIL PROTECTED]> wrote:
> Jim Winstead wrote:
>>  fsockopen: add host header to example, add see also for curl extension
>>  
>>-    fputs ($fp, "GET / HTTP/1.0\r\n\r\n");
>>+    fputs ($fp, "GET / HTTP/1.0\r\nHost: www.php.net\r\n\r\n");
> 
> The Host: header is only present in HTTP/1.1 requests.

unless you're actually using the internet, where the host header is
frequently sent by HTTP/1.0 clients and acknowledged by every server
i've ever encountered.

(and just changing the example to send HTTP/1.1 would be wrong without
dealing with chunked encoding.)

jim

Reply via email to