Bug 113272

Summary: [BlackBerry] Populate the mime type of the WebContext for images
Product: WebKit Reporter: Arvid Nilsson <anilsson>
Component: WebKit BlackBerryAssignee: Arvid Nilsson <anilsson>
Status: RESOLVED FIXED    
Severity: Normal CC: anilsson, jpetsovits, jrogers, mifenton, rwlbuis, staikos, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

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.