Changeset 155203 in webkit
- Timestamp:
- Sep 6, 2013, 12:18:03 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r155199 r155203 1 2013-09-06 Mike West <mkwst@chromium.org> 2 3 Revalidation header blacklisting should be case-insensitive. 4 https://bugs.webkit.org/show_bug.cgi?id=120832 5 6 Reviewed by Alexey Proskuryakov. 7 8 Headers like 'content-type' should be ignored for 304 responses, 9 even if they are delivered as 'Content-Type', or 'CoNtEnT-TyPe', etc. 10 11 I broke this behavior in http://trac.webkit.org/changeset/142068 12 ("Entity-header extension headers honored on 304 responses"). Pages like 13 https://learndev.unm.edu/ currently break on reload, as they incorrectly 14 send 'Content-Type: text/plain' for 304 responses for resources like 15 CSS and JavaScript. The browser should drop these headers, but because 16 we're comparing in a case-sensitive fashion, we don't. 17 18 https://code.google.com/p/chromium/issues/detail?id=246875 documents the 19 Blink-side fix; this patch is a port of that patch. 20 21 Test: http/tests/cache/content-type-ignored-during-revalidation.html 22 23 * loader/cache/CachedResource.cpp: 24 (WebCore::shouldUpdateHeaderAfterRevalidation): 25 Compare the provided AtomicString 'header' to the revalidation 26 blacklists in a case-insensitive fashion. 27 1 28 2013-09-06 Eric Carlson <eric.carlson@apple.com> 2 29 -
trunk/Source/WebCore/loader/cache/CachedResource.cpp
r154142 r155203 91 91 { 92 92 for (size_t i = 0; i < WTF_ARRAY_LENGTH(headersToIgnoreAfterRevalidation); i++) { 93 if ( header == headersToIgnoreAfterRevalidation[i])93 if (equalIgnoringCase(header, headersToIgnoreAfterRevalidation[i])) 94 94 return false; 95 95 } 96 96 for (size_t i = 0; i < WTF_ARRAY_LENGTH(headerPrefixesToIgnoreAfterRevalidation); i++) { 97 if (header.startsWith(headerPrefixesToIgnoreAfterRevalidation[i] ))97 if (header.startsWith(headerPrefixesToIgnoreAfterRevalidation[i], false)) 98 98 return false; 99 99 }
Note:
See TracChangeset
for help on using the changeset viewer.