[webkit-reviews] review granted: [Bug 52570] [Gtk] No need to content sniff 304 Not Modified responses : [Attachment 79159] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 17 09:35:17 PST 2011


Martin Robinson <mrobinson at webkit.org> has granted Sergio Villar Senin
<svillar at igalia.com>'s request for review:
Bug 52570: [Gtk] No need to content sniff 304 Not Modified responses
https://bugs.webkit.org/show_bug.cgi?id=52570

Attachment 79159: Patch
https://bugs.webkit.org/attachment.cgi?id=79159&action=review

------- Additional Comments from Martin Robinson <mrobinson at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=79159&action=review

Looks good! If this doesn't change functionality, you should put a note in the
ChangeLog where the tests line normally is. If it does change functionality, it
might need a test.

> Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp:249
> +    if (handle->shouldContentSniff())
> +	   // Avoid MIME type sniffing if the response comes back as 304 Not
Modified.
> +	   if (msg->status_code == SOUP_STATUS_NOT_MODIFIED) {
> +	       soup_message_disable_feature(msg, SOUP_TYPE_CONTENT_SNIFFER);
> +	       g_signal_handlers_disconnect_by_func(msg,
reinterpret_cast<gpointer>(contentSniffedCallback), handle.get());
> +	   } else
> +	       return;

You should use curly braces with the outer loop since its body is more than one
line.


More information about the webkit-reviews mailing list