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) 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. | 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
rights reserved. |
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // this list, also grabbed from Chromium's net/http/http_response_headers.cc. | 74 // this list, also grabbed from Chromium's net/http/http_response_headers.cc. |
75 const char* const headerPrefixesToIgnoreAfterRevalidation[] = { | 75 const char* const headerPrefixesToIgnoreAfterRevalidation[] = { |
76 "content-", | 76 "content-", |
77 "x-content-", | 77 "x-content-", |
78 "x-webkit-" | 78 "x-webkit-" |
79 }; | 79 }; |
80 | 80 |
81 static inline bool shouldUpdateHeaderAfterRevalidation(const AtomicString& heade
r) | 81 static inline bool shouldUpdateHeaderAfterRevalidation(const AtomicString& heade
r) |
82 { | 82 { |
83 for (size_t i = 0; i < WTF_ARRAY_LENGTH(headersToIgnoreAfterRevalidation); i
++) { | 83 for (size_t i = 0; i < WTF_ARRAY_LENGTH(headersToIgnoreAfterRevalidation); i
++) { |
84 if (header == headersToIgnoreAfterRevalidation[i]) | 84 if (equalIgnoringCase(header, headersToIgnoreAfterRevalidation[i])) |
85 return false; | 85 return false; |
86 } | 86 } |
87 for (size_t i = 0; i < WTF_ARRAY_LENGTH(headerPrefixesToIgnoreAfterRevalidat
ion); i++) { | 87 for (size_t i = 0; i < WTF_ARRAY_LENGTH(headerPrefixesToIgnoreAfterRevalidat
ion); i++) { |
88 if (header.startsWith(headerPrefixesToIgnoreAfterRevalidation[i])) | 88 if (header.startsWith(headerPrefixesToIgnoreAfterRevalidation[i], false)
) |
89 return false; | 89 return false; |
90 } | 90 } |
91 return true; | 91 return true; |
92 } | 92 } |
93 | 93 |
94 DEFINE_DEBUG_ONLY_GLOBAL(RefCountedLeakCounter, cachedResourceLeakCounter, ("Res
ource")); | 94 DEFINE_DEBUG_ONLY_GLOBAL(RefCountedLeakCounter, cachedResourceLeakCounter, ("Res
ource")); |
95 | 95 |
96 Resource::Resource(const ResourceRequest& request, Type type) | 96 Resource::Resource(const ResourceRequest& request, Type type) |
97 : m_resourceRequest(request) | 97 : m_resourceRequest(request) |
98 , m_responseTimestamp(currentTime()) | 98 , m_responseTimestamp(currentTime()) |
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 Vector<ResourcePtr<Resource> > resources; | 869 Vector<ResourcePtr<Resource> > resources; |
870 for (HashSet<Resource*>::iterator it = m_resourcesWithPendingClients.begin()
; it != end; ++it) | 870 for (HashSet<Resource*>::iterator it = m_resourcesWithPendingClients.begin()
; it != end; ++it) |
871 resources.append(*it); | 871 resources.append(*it); |
872 m_resourcesWithPendingClients.clear(); | 872 m_resourcesWithPendingClients.clear(); |
873 for (size_t i = 0; i < resources.size(); i++) | 873 for (size_t i = 0; i < resources.size(); i++) |
874 resources[i]->finishPendingClients(); | 874 resources[i]->finishPendingClients(); |
875 } | 875 } |
876 | 876 |
877 } | 877 } |
878 | 878 |
OLD | NEW |