diff options
Diffstat (limited to 'webkit/appcache/appcache_request_handler.cc')
-rw-r--r-- | webkit/appcache/appcache_request_handler.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/webkit/appcache/appcache_request_handler.cc b/webkit/appcache/appcache_request_handler.cc index 064b378..a90d6d7 100644 --- a/webkit/appcache/appcache_request_handler.cc +++ b/webkit/appcache/appcache_request_handler.cc @@ -137,6 +137,16 @@ AppCacheURLRequestJob* AppCacheRequestHandler::MaybeLoadFallbackForResponse( int code_major = request->GetResponseCode() / 100; if (code_major !=4 && code_major != 5) return NULL; + + // Servers can override the fallback behavior with a response header. + const std::string kFallbackOverrideHeader( + "x-chromium-appcache-fallback-override"); + const std::string kFallbackOverrideValue( + "disallow-fallback"); + std::string header_value; + request->GetResponseHeaderByName(kFallbackOverrideHeader, &header_value); + if (header_value == kFallbackOverrideValue) + return NULL; } // 6.9.6, step 4: If this results in a 4xx or 5xx status code |