Skip to content
  • ap@apple.com's avatar
    REGRESSION(r158333): http/tests/xmlhttprequest/response-encoding.html and... · 2a262349
    ap@apple.com authored
    REGRESSION(r158333): http/tests/xmlhttprequest/response-encoding.html and xmlhttprequest-overridemimetype-content-type-header.html are failing
    https://bugs.webkit.org/show_bug.cgi?id=123548
    
    Reviewed by Brady Eidson.
    
    Source/WebCore:
    
    We had code that made sure that cached 200 responses weren't used for conditional
    requests. But it didn't work the other way - cached 304 responses got reused for
    subsequent unconditional requests!
    
    Adding the test uncovered this bug.
    
    * loader/cache/CachedRawResource.cpp: (WebCore::shouldIgnoreHeaderForCacheReuse):
    Should never ignore conditional headers. Code in determineRevalidationPolicy
    was already undoing this for conditional requests, but we also shouldn't use
    WebCore cache if it holds a 304 response to conditional request.
    
    * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::determineRevalidationPolicy):
    Even though the changed code is only for raw resources, I think that we can never
    get a conditional request here any more.
    
    LayoutTests:
    
    * TestExpectations: Unskip tests that used to be affected by response-empty-arraybuffer.html
    
    * http/tests/xmlhttprequest/response-empty-arraybuffer-expected.txt:
    * http/tests/xmlhttprequest/response-empty-arraybuffer.html:
    Fix a stupid typo. This test actually fully passes.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158362 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    2a262349