[Webkit-unassigned] [Bug 168299] [SOUP] Ensure a response MIME type when Content-Type is missing and sniffing not allowed

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 14 03:47:09 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=168299

--- Comment #3 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 301481
  --> https://bugs.webkit.org/attachment.cgi?id=301481
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=301481&action=review

>> Source/WebKit2/NetworkProcess/soup/NetworkDataTaskSoup.cpp:334
>> +        }
> 
> What about just adding
> 
> if (m_response.mimeType().isEmpty() && m_soupMessage->status_code != SOUP_STATUS_NOT_MODIFIED)
>     m_response.setMimeType(MIMETypeRegistry::getMIMETypeForPath(m_response.url().path()));
> 
> to the previous code? I prefer that option because it  clearly shows that the call to updateFromSoupMessage is unconditional.

Yes, I thought about that, and I didn't do it to avoid checking 304 twice, but it's not a big deal anyway. I'll update it before landing, thanks for the review.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170214/0f472466/attachment.html>


More information about the webkit-unassigned mailing list