Opened 19 years ago
Closed 19 years ago
#1378 closed defect (bug) (duplicate)
Bug with Conditional GET in wp-blog-header.php not resolved
Reported by: | netspy | Owned by: | ryan |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 1.5.1 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
The patch for bug #1356 is IMO not correct. A conditional GET request with IF_NONE_MATCH will produce an PHP warning:
PHP Warning: strtotime() [<a href='function.strtotime'>function.strtotime</a>]: Called with an empty time parameter. in /.../wp-blog-header.php on line 139
Here my version of the patch:
($client_etag && ($client_etag == $wp_etag))) {
if ( preg_match('/cgi/',php_sapi_name()) ) {
header('Status: 304 Not Modified');
echo "\r\n\r\n";
exit;
} else {
if ( version_compare(phpversion(), '4.3.0', '>=') )
header('Not Modified', TRUE, 304);
else
header('HTTP/1.x 304 Not Modified');
exit;
}
}
This works fine with IF_MODIFIED_SINCE and IF_NONE_MATCH requests.
Change History (2)
Note: See
TracTickets for help on using
tickets.