ID: 25204 User updated by: support at inmarket dot lviv dot ua Reported By: support at inmarket dot lviv dot ua -Status: Bogus +Status: Open Bug Type: CGI related Operating System: win32 PHP Version: 4.3.2 New Comment:
And whose problem is this: Apache or PHP? Previous Comments: ------------------------------------------------------------------------ [2003-08-23 11:36:57] support at inmarket dot lviv dot ua And what if some stupid hosting provider has PHP thru CGI??? Like mine does! And, after all, why does this happen? This must be a trivial task to fix? ------------------------------------------------------------------------ [2003-08-22 19:57:50] [EMAIL PROTECTED] This is not really Apache related but CGI. If you were really using the apache module, this would propably work just fine. See: http://www.mnot.net/cgi_buffer/ ------------------------------------------------------------------------ [2003-08-22 09:52:04] support at inmarket dot lviv dot ua The test script simply sends "ETag" header via header("ETag: 0-1234-12345678"); My Apache is win32 1.3.28, PHP 4.3.2 CGI - default configuration ------------------------------------------------------------------------ [2003-08-22 03:21:39] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Also, what is in your script? Which apache version? How did you configure PHP? ------------------------------------------------------------------------ [2003-08-22 02:47:54] support at inmarket dot lviv dot ua Description: ------------ Actually I posted this bug to Apache, but they said this is PHP bug. I noticed that ETag responce header from PHP script is simply ignored. If there comes a request with "If-None-Match" and the script responds with "ETag" that matches it, the server responds with "200 OK" status. When checked with static content, Apache has no problem responding with "304 Not Modified". There is no problem when script responds with "Last-Modified", and the server then ends up with "304 Not Modified". What I got from Apache bug report system: This is a php bug. The handler (read: PHP) is responsible for calling ap_meets_conditions at the proper place (i.e. before sending the content) or doing the evaluation that takes place there itself. Please address this issue to the php bug database. Regards, Dennis Reproduce code: --------------- Request: GET /temp/etag.php HTTP/1.1 If-None-Match: "0-1234-12345678" Responce: HTTP/1.1 200 OK -- should be 304 as for static content is ETag: "0-1234-12345678" Whereas using time-related headers: Request: GET /temp/etag.php HTTP/1.1 If-Modified-Since: Thu, 31 Jul 2003 19:12:11 GMT Responce: HTTP/1.1 304 Not Modified -- as expected Last-Modified: Thu, 31 Jul 2003 19:12:11 GMT Also combining two kinds of headers is useless: Request: GET /temp/etag.php HTTP/1.1 If-None-Match: "0-1234-12345678" If-Modified-Since: Thu, 31 Jul 2003 19:12:11 GMT Responce: HTTP/1.1 200 OK -- Note this happens despite Last-Modified! ETag: "0-1234-12345678" Last-Modified: Thu, 31 Jul 2003 19:12:11 GMT ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25204&edit=1