WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
45699
ResourceResponseBase::setMimeType wants mimetype and not content type
https://bugs.webkit.org/show_bug.cgi?id=45699
Summary
ResourceResponseBase::setMimeType wants mimetype and not content type
Fridrich Strba
Reported
2010-09-13 12:59:22 PDT
If we pass to the ResourceResponseBase::setMimeType a content type instead of mimetype, we might be lucky on platform, where the two are the same, but it breaks loading of local files on windows. The attached patch fixes this problem
Attachments
Patch
(1.15 KB, patch)
2010-09-13 13:01 PDT
,
Fridrich Strba
mrobinson
: review-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Fridrich Strba
Comment 1
2010-09-13 13:01:58 PDT
Created
attachment 67460
[details]
Patch
Martin Robinson
Comment 2
2010-09-13 13:23:41 PDT
Comment on
attachment 67460
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=67460&action=prettypatch
> WebCore/platform/network/soup/ResourceHandleSoup.cpp:869 > + response.setMimeType(g_content_type_get_mime_type(g_file_info_get_content_type(info)));
It isn't well documented, but this is a memory leak, because g_content_type_get_mime_type returns a newly-allocated string.
Martin Robinson
Comment 3
2011-04-14 15:34:27 PDT
I don't think this is an issue any longer. The code looks like this now: const gchar* contentType = soup_request_get_content_type(d->m_soupRequest.get()); d->m_response.setMimeType(extractMIMETypeFromMediaType(contentType)); The Soup content type is always the mime type. Feel free to re-open if I'm wrong about this.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug