feof blocks on sockets
<p>on Mac OS X the following feof() call never returns. </p>

<pre><code>&lt;?php
$hostname = "localhost";
$fh = fsockopen($hostname, 80, &amp;$errno, &amp;$errstr);
if ($errno) {
    print $errstr;
    exit;
}
$request = &lt;&lt;&lt;request
GET / HTTP/1.0
Host: $hostname
Connection: close

request;
fputs($fh,$request);
while (!feof($fh))
    echo fgets($fh);
fclose($fh);
?&gt;
</code></pre>

<p>Are you having the same problem in other platforms? Any idea to solve it?</p>
