ID: 30502 Updated by: [email protected] Reported By: glideraerobatics at hotmail dot com -Status: Feedback +Status: No Feedback Bug Type: HTTP related Operating System: Linux PHP Version: 5.0.2 New Comment:
No feedback was provided for this bug for over a week, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open". Previous Comments: ------------------------------------------------------------------------ [2005-03-07 22:21:37] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ------------------------------------------------------------------------ [2004-10-20 21:22:34] glideraerobatics at hotmail dot com Description: ------------ I've noticed numerous times that certain headers produced by PHP scripts are duplicated. Another problem is that the Content-Length header is set in code, but is missing in the output. See below the expected and actual responses. Actual response discards the Content-Length header and duplicates the Content-Disposition header. I sent this request to the PHP script to test it: HEAD /download.php/458/Cats_in_the_Cradle.mid HTTP/1.1 Host: wapxtc.nl accept-language: nl user-agent: SonyEricssonT230/R101 cache-control: no-cache accept: text/vnd.wap.wml,text/vnd.wap.wmlscript,*/*;q=0.001 accept-charset: us-ascii,iso-8859-1,utf-8,iso-10646-ucs-2,*;q=0.001 accept-encoding: *;q=0.001 FYI: I'm running Apache 2 (stable) on PHP5.02 (stable) on Linux. Reproduce code: --------------- // $data contains blob header('Content-Length: ' . strlen($data)); header('Content-Type: ' . $item['MIMETYPE']); header('Content-Disposition: inline; filename="' . $filename . '"'); // This outputs the 3 lines above in the error_log as expected: error_log(implode("\n",headers_list())); if ($_SERVER['REQUEST_METHOD'] != 'HEAD') { print $data; } exit; Expected result: ---------------- HTTP/1.1 200 OK Content-Disposition: inline; filename="Cats_in_the_Cradle.mid" Last-Modified: Mon, 18 Oct 2004 13:23:52 GMT Content-Type: audio/midi Content-Length: 6331 Actual result: -------------- HTTP/1.1 200 OK Content-Disposition: inline; filename="Cats_in_the_Cradle.mid" Last-Modified: Mon, 18 Oct 2004 13:23:52 GMT Content-Type: audio/midi Content-Disposition: inline; filename="Cats_in_the_Cradle.mid" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30502&edit=1
