Re: cvs: phpdoc /en/functions network.xml
| From: | Jim Winstead | Date: | Sat, 08 Dec 2001 22:37:50 +0000 |
| Subject: | Re: cvs: phpdoc /en/functions network.xml | ||
| References: | 1 2 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969339577@lists.php.net to get a copy of this message | ||
Johannes Froemter <j-f@gmx.net> 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