Bug 113272 - [BlackBerry] Populate the mime type of the WebContext for images
Summary: [BlackBerry] Populate the mime type of the WebContext for images
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Arvid Nilsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-25 21:13 PDT by Arvid Nilsson
Modified: 2013-03-27 17:01 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.72 KB, patch)
2013-03-25 21:20 PDT, Arvid Nilsson
no flags Details | Formatted Diff | Diff
Patch (3.35 KB, patch)
2013-03-26 11:24 PDT, Arvid Nilsson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Nilsson 2013-03-25 21:13:25 PDT
PR 278967
Comment 1 Arvid Nilsson 2013-03-25 21:20:52 PDT
Created attachment 194994 [details]
Patch
Comment 2 George Staikos 2013-03-26 07:30:29 PDT
Comment on attachment 194994 [details]
Patch

This looks really hacky.  Is this the best way to achieve this result?
Comment 3 Arvid Nilsson 2013-03-26 07:32:19 PDT
(In reply to comment #2)
> (From update of attachment 194994 [details])
> This looks really hacky.  Is this the best way to achieve this result?

My thinking is that this is better than using the one in ResourceResponse, because the server could be misconfigured and report broken or no mime type.
Comment 4 Arvid Nilsson 2013-03-26 07:32:59 PDT
So even though

context.setMimetype(cachedImage->response().mimeType())

is a lot less code, I'm worried it's less reliable.
Comment 5 George Staikos 2013-03-26 07:58:38 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 194994 [details] [details])
> > This looks really hacky.  Is this the best way to achieve this result?
> 
> My thinking is that this is better than using the one in ResourceResponse, because the server could be misconfigured and report broken or no mime type.

Shouldn't we take the server-issued one if it is issued, and if not, then try to put our own in?
Comment 6 Arvid Nilsson 2013-03-26 11:08:32 PDT
(In reply to comment #5)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > (From update of attachment 194994 [details] [details] [details])
> > > This looks really hacky.  Is this the best way to achieve this result?
> > 
> > My thinking is that this is better than using the one in ResourceResponse, because the server could be misconfigured and report broken or no mime type.
> 
> Shouldn't we take the server-issued one if it is issued, and if not, then try to put our own in?

I had it that way originally, let me put it back in =)
Comment 7 Arvid Nilsson 2013-03-26 11:24:42 PDT
Created attachment 195125 [details]
Patch
Comment 8 Arvid Nilsson 2013-03-27 05:42:04 PDT
Comment on attachment 195125 [details]
Patch

Thanks, George =)
Comment 9 WebKit Review Bot 2013-03-27 17:01:14 PDT
Comment on attachment 195125 [details]
Patch

Clearing flags on attachment: 195125

Committed r147024: <http://trac.webkit.org/changeset/147024>
Comment 10 WebKit Review Bot 2013-03-27 17:01:18 PDT
All reviewed patches have been landed.  Closing bug.