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

Of course, I don't mean a 304 "error" - I mean a 304 response


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

[2003-11-27 17:03:06] steven at pearavenue dot com

Description:
------------
Context passed to fopen does not appear to include header in request.

Reproduce code:
---------------
$uri  = 'http://www.what-it-all-means.com/index.rdf';

$agent = "First-Say-RSS-AGGREGATOR/0.0.2.4 http://www.firstsay.net";;
$since = 'Thu, 27 Nov 2003 06:03:08 GMT';
$etag = '"7051a-36a7-3fc5939c"';
$opts = array(
              'http' => array(
                  'method' => "GET",
                  'header' => "If-None-Match: $etag\r\n".              
                                                          
                              "If-Modified-Since: $since\r\n",
                  'user_agent' => $agent
                      )
              );

$context = stream_context_create($opts);


$fp = @fopen($uri, 'rb', false, $context);
if (!is_resource($fp)) {
  echo "error";
}
var_dump(stream_context_get_options($fp) );
echo "\n:::::\n";
var_dump ( stream_get_meta_data($fp) );

fclose($fp);


Expected result:
----------------
With the appropriate URL, http-date and etag (you may have to change
those above) this should produce a 304 error 

Actual result:
--------------
produces a 200, as though the header is ignored.


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


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

Reply via email to