#3555 closed defect (bug) (duplicate)
Some servers escape $_SERVER['HTTP_IF_NONE_MATCH'], breaking 304 Etag matching
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | General | Version: | 2.0.6 |
| Severity: | major | Keywords: | |
| Cc: |
Description (last modified by markjaquith)
I've found that on some servers, $_SERVER['HTTP_IF_NONE_MATCH'] 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.
Change History (3)
comment:1
markjaquith
— 6 years ago
- Description modified (diff)
- Owner changed from anonymous to markjaquith
- Status changed from new to assigned
- Summary changed from Some servers escape $_SERVER['HTTP_IF_NOT_MODIFIED'], breaking 304 Etag matching to Some servers escape $_SERVER['HTTP_IF_NONE_MATCH'], breaking 304 Etag matching
comment:2
markjaquith
— 6 years ago
- Resolution set to duplicate
- Status changed from assigned to closed
Thought this sounded familiar. Duplicate of #2597 which was fixed for trunk. Just needs a backport for 2.0.7
Oops, mistyped the header name... it is $_SERVER['HTTP_IF_NONE_MATCH']