ID:               26440
 User updated by:  steven at pearavenue dot com
 Reported By:      steven at pearavenue dot com
 Status:           Closed
 Bug Type:         HTTP related
 Operating System: Linux
 PHP Version:      4.3.4
 Assigned To:      pollita
 New Comment:

I can confirm that is now behaves as specified in this report, if not
as expected :), in the php4-STABLE-200311282030 build - however, I urge
a review of this behavior.

Formally there is a clear distinction between correct behavior in
response to an "If-Modified-Since" and a failure that results from and
invalid URI.

In addition, stream_get_meta_data( resource ) should be consistent with
$http_response_header. Currently  stream_get_meta_data fails if the
resource failed - I suggest that it should report the details of the
stream state - including a failure.

While the pragmatics of having fopen return false for a 304 are good -
I suggest that this is in fact incorrect semantics - fopen succeeded
and therefore, formally, should return true.


Previous Comments:
------------------------------------------------------------------------

[2003-11-28 14:47:28] steven at pearavenue dot com

Ah, but if this is the case then 

stream_get_meta_data

should not fail after the resource fails - which the above example
shows it does.

------------------------------------------------------------------------

[2003-11-28 14:38:31] [EMAIL PROTECTED]

RTM:
http://uk.php.net/manual/en/wrappers.php
search for $http_response_header

------------------------------------------------------------------------

[2003-11-28 14:04:23] steven at pearavenue dot com

A footnote here. 

I am concerned that this behavior does not distinquish between a
"If-Modified-Since" 304 and an honest to goodness error (e.g., a "Not
Found" uri).  

The designers might consider some means to recover the response/error
or a modification of this behavior. Let me know.

------------------------------------------------------------------------

[2003-11-28 13:57:19] steven at pearavenue dot com

My thanks. 

I will confirm with the latest snap. Someone should document this 304
behavior - it is very useful.

------------------------------------------------------------------------

[2003-11-28 13:49:55] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

PHP4 was missing certain context features that prevented it from
sending any context headers other then user_agent. This is now fixed.

Now in both PHP5 & PHP4 fopen() fails due to 304 response code.

------------------------------------------------------------------------

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/26440

-- 
Edit this bug report at http://bugs.php.net/?id=26440&edit=1

Reply via email to