From:             support at inmarket dot lviv dot ua
Operating system: 
PHP version:      4.3.2
PHP Bug Type:     HTTP related
Bug description:  ETag Responce Header Ignored

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 bug report at http://bugs.php.net/?id=25204&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25204&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25204&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25204&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25204&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25204&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25204&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25204&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25204&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25204&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25204&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25204&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25204&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25204&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25204&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25204&r=gnused

Reply via email to