Edit report at https://bugs.php.net/bug.php?id=60471&edit=1
ID: 60471 Comment by: michal dot pipa dot xsolve at gmail dot com Reported by: lolautruche at gmail dot com Summary: Random "Invalid request (unexpected EOF)" using a router script Status: Assigned Type: Bug Package: Built-in web server Operating System: Mac OS X 10.7.2 (Lion) PHP Version: 5.4.0RC2 Assigned To: laruence Block user comment: N Private report: N New Comment: I've attached a patch that disables "Unexpected EOF" error message from built-in server. Previous Comments: ------------------------------------------------------------------------ [2012-02-23 18:45:53] michal dot pipa dot xsolve at gmail dot com I've noticed these messages and did some network traffic analysis. I've tested this on Ubuntu and Chromium. What I've found is that Chromium has feature called "Predict network actions to improve page load performance" and it's enabled by default. It works this way, that if HTML page has links to some resources, than Chromium opens about 10 TCP connections in advance. And then if browser has less than 10 resources to fetch, unused connections times out after 10 seconds. And this (empty payload) causes PHP server to display "Invalid request (unexpected EOF)" message. See: http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/sapi/cli/php_cli_server.c?revision=322966&view=markup#l1591 When you disable this Chromium's feature it doesn't open TCP connections in advance and this error message disappears. I'm wondering if we really need this error message (maybe it was used for some debugging purposes). ------------------------------------------------------------------------ [2012-02-16 18:29:02] ras...@php.net The patch is here: http://svn.php.net/viewvc/php/php-src/trunk/sapi/cli/php_cli_server.c? r1=323078&r2=323077&pathrev=323078&view=patch if someone could test it, please. ------------------------------------------------------------------------ [2012-02-16 18:24:54] ras...@php.net Could this simply be caused by the "Connection: closed" message instead of the correct "Connection: close" message the built-in server spits out? This is fixed in trunk but hasn't been merged to 5.4 yet. ------------------------------------------------------------------------ [2012-02-12 17:06:17] rbrunius at gmail dot com I'm am having the same thing happen and I Googled error code it and found this thread. I tried various ways to terminate the file but none solved it. php 5.4 RC7 development server on Windows 7 Chrome browser has brings the issue but Firefox does not. ------------------------------------------------------------------------ [2011-12-09 13:59:12] patrickalla...@php.net @laruence: Gentoo Linux Most of the time, several of those messages appears in one block like in: [Thu Dec 8 13:39:29 2011] 127.0.0.1:50358 Invalid request (Unexpected EOF) [Thu Dec 8 13:39:29 2011] 127.0.0.1:50359 Invalid request (Unexpected EOF) [Thu Dec 8 13:39:29 2011] 127.0.0.1:50360 Invalid request (Unexpected EOF) [Thu Dec 8 13:39:29 2011] 127.0.0.1:50361 Invalid request (Unexpected EOF) [Thu Dec 8 13:39:29 2011] 127.0.0.1:50362 Invalid request (Unexpected EOF) I expect it comes from the fact that the page generated by the built-in server contains references to pictures, js and css files that has been downloaded by chrome through the built-in server. Does chrome do some special treatment? Can't reproduce with a dummy page with just an Hello World. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=60471 -- Edit this bug report at https://bugs.php.net/bug.php?id=60471&edit=1