I like the Host: line, but the request should be left HTTP/1.0.  That
example needs more headers to be HTTP/1.1 proper.

-Sara

"Nuno Lopes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> nlopess Wed Dec 10 10:28:18 2003 EDT
>
>   Modified files:
>     /phpdoc/en/reference/sockets reference.xml
>   Log:
>   corrected example
>
> Index: phpdoc/en/reference/sockets/reference.xml
> diff -u phpdoc/en/reference/sockets/reference.xml:1.11
phpdoc/en/reference/sockets/reference.xml:1.12
> --- phpdoc/en/reference/sockets/reference.xml:1.11 Sat Aug 16 14:59:12
2003
> +++ phpdoc/en/reference/sockets/reference.xml Wed Dec 10 10:28:18 2003
> @@ -1,5 +1,5 @@
>  <?xml version="1.0" encoding="iso-8859-1"?>
> -<!-- $Revision: 1.11 $ -->
> +<!-- $Revision: 1.12 $ -->
>   <reference id="ref.sockets">
>    <title>Socket functions</title>
>    <titleabbrev>Sockets</titleabbrev>
> @@ -205,7 +205,8 @@
>      echo "OK.\n";
>  }
>
> -$in = "HEAD / HTTP/1.0\r\n\r\n";
> +$in = "HEAD / HTTP/1.1\r\n";
> +$in .= "Host: www.example.com\r\n\r\n";
>  $out = '';
>
>  echo "Sending HTTP HEAD request...";

Reply via email to