Issues

ZF-533: Server only reads the first line of the request

Issue Type: Bug Created: 2006-11-10T15:11:34.000+0000 Last Updated: 2007-07-05T14:43:28.000+0000 Status: Resolved Fix version(s): - 0.7.0 (18/Jan/07)

Reporter: Shahar Evron (shahar) Assignee: Mat Scales (mat) Tags: - Zend_Http_Server

Related issues: Attachments:

Description

It seems that the server only reads the first line of the request from the client, and then sends out the response. For example:

<pre class="highlight">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:

<pre class="highlight">
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.

Comments

Posted by Mat Scales (mat) on 2006-11-11T16:02:04.000+0000

I made a change to the way this was handled just before commiting the code... looks like I messed it up!

I'll see if I can remember what I changed and put it back

Posted by Shahar Evron (shahar) on 2006-11-18T10:53:50.000+0000

In revision 1727 this problem still happens (after the ZF-547 fix)

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts