Bug 88642 - [BlackBerry] Wrong mimetype for empty file link
Summary: [BlackBerry] Wrong mimetype for empty file link
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mary Wu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-08 03:21 PDT by Mary Wu
Modified: 2012-06-11 20:45 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.68 KB, patch)
2012-06-08 03:39 PDT, Mary Wu
no flags Details | Formatted Diff | Diff
Patch (1.95 KB, patch)
2012-06-10 19:31 PDT, Mary Wu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.