OLD | NEW |
---|---|
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) | 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) |
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) | 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) |
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. |
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
7 | 7 |
8 This library is free software; you can redistribute it and/or | 8 This library is free software; you can redistribute it and/or |
9 modify it under the terms of the GNU Library General Public | 9 modify it under the terms of the GNU Library General Public |
10 License as published by the Free Software Foundation; either | 10 License as published by the Free Software Foundation; either |
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
853 // with this one, or vice versa, re-fetch the resource. | 853 // with this one, or vice versa, re-fetch the resource. |
854 // | 854 // |
855 // This helps with the case where the server sends back | 855 // This helps with the case where the server sends back |
856 // "Access-Control-Allow-Origin: *" all the time, but some of the | 856 // "Access-Control-Allow-Origin: *" all the time, but some of the |
857 // client's requests are made without CORS and some with. | 857 // client's requests are made without CORS and some with. |
858 if (existingResource->resourceRequest().allowCookies() != request.allowCooki es()) { | 858 if (existingResource->resourceRequest().allowCookies() != request.allowCooki es()) { |
859 LOG(ResourceLoading, "ResourceFetcher::determineRevalidationPolicy reloa ding due to difference in credentials settings."); | 859 LOG(ResourceLoading, "ResourceFetcher::determineRevalidationPolicy reloa ding due to difference in credentials settings."); |
860 return Reload; | 860 return Reload; |
861 } | 861 } |
862 | 862 |
863 // For compatibility, reload existing resource with a Raw type (read: XHR.) | |
864 if (type == Resource::Raw) | |
Nate Chapin
2013/11/05 19:39:24
We probably want a narrower fix than this. RawReso
| |
865 return Reload; | |
866 | |
863 // During the initial load, avoid loading the same resource multiple times f or a single document, even if the cache policies would tell us to. | 867 // During the initial load, avoid loading the same resource multiple times f or a single document, even if the cache policies would tell us to. |
864 if (document() && !document()->loadEventFinished() && m_validatedURLs.contai ns(existingResource->url())) | 868 if (document() && !document()->loadEventFinished() && m_validatedURLs.contai ns(existingResource->url())) |
865 return Use; | 869 return Use; |
866 | 870 |
867 // CachePolicyReload always reloads | 871 // CachePolicyReload always reloads |
868 if (context().cachePolicy(type) == CachePolicyReload) { | 872 if (context().cachePolicy(type) == CachePolicyReload) { |
869 LOG(ResourceLoading, "ResourceFetcher::determineRevalidationPolicy reloa ding due to CachePolicyReload."); | 873 LOG(ResourceLoading, "ResourceFetcher::determineRevalidationPolicy reloa ding due to CachePolicyReload."); |
870 return Reload; | 874 return Reload; |
871 } | 875 } |
872 | 876 |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1320 } | 1324 } |
1321 #endif | 1325 #endif |
1322 | 1326 |
1323 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() | 1327 const ResourceLoaderOptions& ResourceFetcher::defaultResourceOptions() |
1324 { | 1328 { |
1325 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, UseDefaul tOriginRestrictionsForType, DocumentContext)); | 1329 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, options, (SendCallbacks, SniffCon tent, BufferData, AllowStoredCredentials, ClientRequestedCredentials, AskClientF orCrossOriginCredentials, DoSecurityCheck, CheckContentSecurityPolicy, UseDefaul tOriginRestrictionsForType, DocumentContext)); |
1326 return options; | 1330 return options; |
1327 } | 1331 } |
1328 | 1332 |
1329 } | 1333 } |
OLD | NEW |