Bug 88642

Summary: [BlackBerry] Wrong mimetype for empty file link
Product: WebKit Reporter: Mary Wu <mawu>
Component: PlatformAssignee: Mary Wu <mawu>
Status: RESOLVED FIXED    
Severity: Normal CC: charles.wei, rwlbuis, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Mary Wu 2012-06-08 03:21:55 PDT
For empty file link, we shouldn't give "application/octet-stream" which will lead to download.
Comment 1 Mary Wu 2012-06-08 03:39:09 PDT
Created attachment 146534 [details]
Patch
Comment 2 Rob Buis 2012-06-08 04:33:01 PDT
Comment on attachment 146534 [details]
Patch

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

Change is correct but might be able to clean it up.

> Source/WebCore/platform/network/blackberry/NetworkJob.cpp:625
> +        mimeType = "text/plain";

It seems like you can change the if if if if to if else if else sections. What do you think? This avoids testing for isNull() when you already know the outcome based on the previous statement/assignment.
Comment 3 Mary Wu 2012-06-10 19:28:06 PDT
(In reply to comment #2)
> (From update of attachment 146534 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=146534&action=review
> 
> Change is correct but might be able to clean it up.
> 
> > Source/WebCore/platform/network/blackberry/NetworkJob.cpp:625
> > +        mimeType = "text/plain";
> 
> It seems like you can change the if if if if to if else if else sections. What do you think? This avoids testing for isNull() when you already know the outcome based on the previous statement/assignment.

yes, could add else if some place.
Comment 4 Mary Wu 2012-06-10 19:31:22 PDT
Created attachment 146764 [details]
Patch
Comment 5 Rob Buis 2012-06-11 06:49:31 PDT
Comment on attachment 146764 [details]
Patch

LGTM.
Comment 6 WebKit Review Bot 2012-06-11 20:44:56 PDT
Comment on attachment 146764 [details]
Patch

Clearing flags on attachment: 146764

Committed r120035: <http://trac.webkit.org/changeset/120035>
Comment 7 WebKit Review Bot 2012-06-11 20:45:00 PDT
All reviewed patches have been landed.  Closing bug.