[wp-trac] [WordPress Trac] #3555: Some servers escape
$_SERVER['HTTP_IF_NOT_MODIFIED'], breaking 304 Etag matching
WordPress Trac
wp-trac at lists.automattic.com
Wed Jan 10 13:34:22 GMT 2007
#3555: Some servers escape $_SERVER['HTTP_IF_NOT_MODIFIED'], breaking 304 Etag
matching
-------------------------+--------------------------------------------------
Reporter: markjaquith | Owner: anonymous
Type: defect | Status: new
Priority: high | Milestone: 2.1
Component: General | Version: 2.0.6
Severity: major | Keywords:
-------------------------+--------------------------------------------------
I've found that on some servers, {{{$_SERVER['HTTP_IF_NOT_MODIFIED']}}} is
backslash-escaped. WP then comes along and escapes it again, so your Etag
looks like:
{{{\\\"65e8871191351efa4678a314e040fa34\\\"}}}
Then, before checking, WP runs {{{stripslashes()}}} once, which gets you
to:
{{{\"65e8871191351efa4678a314e040fa34\"}}}
It then tries to compare the Etags, but fails, because of the backslashes.
Thus, a 304 is not served, content is served, and bandwidth is wasted.
Patches coming.
--
Ticket URL: <http://trac.wordpress.org/ticket/3555>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list