Changeset 75967 in webkit
- Timestamp:
- Jan 17, 2011 12:47:08 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r75966 r75967 1 2011-01-17 Sergio Villar Senin <svillar@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [Gtk] No need to content sniff 304 Not Modified responses 6 https://bugs.webkit.org/show_bug.cgi?id=52570 7 8 Makes no sense to wait for the outcome of content sniffing when WebCore 9 is validating resources. If we get a 304 Not Modified it means that we can 10 safely use the cached version of the resource we're asking for. 11 12 No new tests because it does not change functionality, it just 13 calls didReceiveResponse sooner for 304 Not Modified responses. 14 15 * platform/network/soup/ResourceHandleSoup.cpp: 16 (WebCore::gotHeadersCallback): 17 1 18 2011-01-17 Jessie Berlin <jberlin@apple.com> 2 19 -
trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp
r75009 r75967 216 216 } 217 217 218 static void contentSniffedCallback(SoupMessage*, const char*, GHashTable*, gpointer); 219 218 220 static void gotHeadersCallback(SoupMessage* msg, gpointer data) 219 221 { … … 236 238 // The content-sniffed callback will handle the response if WebCore 237 239 // require us to sniff. 238 if (!handle || statusWillBeHandledBySoup(msg->status_code) || handle->shouldContentSniff()) 239 return; 240 if (!handle || statusWillBeHandledBySoup(msg->status_code)) 241 return; 242 243 if (handle->shouldContentSniff()) { 244 // Avoid MIME type sniffing if the response comes back as 304 Not Modified. 245 if (msg->status_code == SOUP_STATUS_NOT_MODIFIED) { 246 soup_message_disable_feature(msg, SOUP_TYPE_CONTENT_SNIFFER); 247 g_signal_handlers_disconnect_by_func(msg, reinterpret_cast<gpointer>(contentSniffedCallback), handle.get()); 248 } else 249 return; 250 } 240 251 241 252 ResourceHandleInternal* d = handle->getInternal();
Note: See TracChangeset
for help on using the changeset viewer.