Changeset 160965 in webkit
- Timestamp:
- Dec 21, 2013 6:40:53 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r160964 r160965 1 2013-12-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Test /webkit2/WebKitWebResource/mime-type fails when run after /webkit2/WebKitWebView/resources 4 https://bugs.webkit.org/show_bug.cgi?id=126119 5 6 Reviewed by Martin Robinson. 7 8 The problem is that when the blank.ico resource is loaded from the 9 disk cache, the mime type is null, because the soup cache doesn't 10 cache sniffed mime types. This doesn't happen when a resource is 11 loaded form the memory cache, because the ResourceResponse is 12 cached, not only the headers. I think the disk cache should also 13 cache the sniffed content type, but that needs to be done in 14 soup. For now we can workaround the issue in the unit test by 15 making sure that resources that can be cached, also include the 16 Content-Type header, this way the mime type won't be sniffed and 17 it will be cached as a HTTP header in the disk cache. 18 19 * UIProcess/API/gtk/tests/TestResources.cpp: 20 (serverCallback): Add Content-Type header for resources that can 21 be cached. 22 1 23 2013-12-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 24 -
trunk/Source/WebKit2/UIProcess/API/gtk/tests/TestResources.cpp
r154567 r160965 678 678 soup_message_body_append(message->response_body, SOUP_MEMORY_STATIC, kStyleCSS, strlen(kStyleCSS)); 679 679 addCacheHTTPHeadersToResponse(message); 680 soup_message_headers_append(message->response_headers, "Content-Type", "text/css"); 680 681 } else if (g_str_equal(path, "/javascript.js")) { 681 682 soup_message_body_append(message->response_body, SOUP_MEMORY_STATIC, kJavascript, strlen(kJavascript)); … … 695 696 soup_message_body_append(message->response_body, SOUP_MEMORY_TAKE, contents, contentsLength); 696 697 addCacheHTTPHeadersToResponse(message); 698 soup_message_headers_append(message->response_headers, "Content-Type", "image/vnd.microsoft.icon"); 697 699 } else if (g_str_equal(path, "/simple-style.css")) { 698 700 static const char* simpleCSS =
Note: See TracChangeset
for help on using the changeset viewer.