ZF-533: Server only reads the first line of the request
It seems that the server only reads the first line of the request from the client, and then sends out the response. For example:
shahar.e@wintergreen tests $ telnet localhost 8888 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET /testSimpleRequests.php HTTP/1.1 HTTP/1.1 200 OK Content-type: text/html X-powered-by: PHP/5.1.6-pl8-gentoo SuccessConnection closed by foreign host.
I only typed the "GET" line - and when I hit enter I got the response. Normally, the server should wait for a blank line (IE two consecutive CRLFs) before it finishes reading.
This prevents sending HTTP headers (and cookies) as well as message body (IE POST data).
For comparison, this is a request for the same file (docroot is different but it's the same script) from Apache 2.0.x:
shahar.e@wintergreen tests $ telnet localhost 80 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET /Framework/tests/testSimpleRequests.php HTTP/1.1 Host: localhost Connection: close HTTP/1.1 200 OK Date: Fri, 10 Nov 2006 21:09:01 GMT Server: Apache X-Powered-By: PHP/5.1.6-pl8-gentoo Content-Length: 7 Connection: close Content-Type: text/html SuccessConnection closed by foreign host.
Here, I was able to type the "Host" and "Connection" headers, and then a blank line, and only then I got the response.