Bug #17098 Updated: apache sending 304 - not modified header
| From: | daniel dot eckl at gmx dot de | Date: | Sat, 20 Jul 2002 14:54:59 +0000 |
| Subject: | Bug #17098 Updated: apache sending 304 - not modified header | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-14693@lists.php.net to get a copy of this message | ||
ID: 17098
Updated by: daniel.eckl@gmx.de
Reported By: pmoor@netpeople.ch
Status: Open
Bug Type: Apache2 related
Operating System: custom linux
PHP Version: 4.0CVS-2002-05-08
New Comment:
I'd like to post a workaround without patching apache or PHP....
Just edit your script(s) to send a 'header("Last-Modified: Mon, 26 Jul
1997 05:00:00 GMT");' or just some other date older than the mdate of
your script file. This solves the problem.
Reason:
The bug causes Apache2 to look for the mdate of the .php file to
determine if it has been modified.
If the browser first gets a header like above, it next time asks for
the page with an 'If-Modified-Since: Mon, 26 Jul 1997 05:00:00 GMT'.
Then, the httpd looks at the mdate of your script, which is always
newer and says: Yes, it has been modified, "200 OK". The script will be
served and it will response again with the header line from above.
Round and round the story goes. :))
Greets, and have fun!
Daniel
Previous Comments:
------------------------------------------------------------------------
[2002-07-10 13:43:02] sander@php.net
Status -> Open
Apache devs are still argueing whether this is a bug in Apache or in
PHP :)
------------------------------------------------------------------------
[2002-07-10 13:37:45] pmoor@netpeople.ch
however: it doesn't work for phpmyadmin ( still displaying old query
results ), BUT at least one of my regular scripts ( just some simple
task ) does indeed work: apache's returning the expected 200 OK
response.
------------------------------------------------------------------------
[2002-07-10 13:31:43] pmoor@netpeople.ch
still doesn't work with php4 and apache2 checkouts from July 10th.
------------------------------------------------------------------------
[2002-07-07 21:10:22] sniper@php.net
Does this happen with latest CVS checkouts of both Apache2 and PHP?
------------------------------------------------------------------------
[2002-06-07 16:25:47] ck-phpbugs@newsclub.de
See Apache2 bug #9673
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9673
Same problem here, seems to be a problem with Apache2 and the filter
concept.
You can have a quick workaround for the moment -
just comment out the If-Modified-Since handling stuff in Apache2:
Comment out line 393 in modules/http/http_protocol.c, (return
HTTP_NOT_MODIFIED). Now, Apache2 does never return 304 Not modified.
And hey, this is a preliminary hot fix only!
Please also check the suggestions of Justin Erenkrantz (see Apache bug
report), I haven't had the time yet to do so.
------------------------------------------------------------------------
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
http://bugs.php.net/17098
--
Edit this bug report at http://bugs.php.net/?id=17098&edit=1