Bug 100083 - Web Inspector: MIME type errors should truncate long URLs.
Summary: Web Inspector: MIME type errors should truncate long URLs.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Mike West
URL:
Keywords:
Depends on: 100196
Blocks: 97978
  Show dependency treegraph
 
Reported: 2012-10-23 00:56 PDT by Mike West
Modified: 2012-10-23 21:46 PDT (History)
9 users (show)

See Also:


Attachments
Patch (9.84 KB, patch)
2012-10-23 02:15 PDT, Mike West
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike West 2012-10-23 00:56:01 PDT
Flickr.com has tons of MIME-type errors like:

    Resource interpreted as Image but transferred with MIME type image/jpg: "data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD ... [STUNNINGLY LONG URL TRUNCATED HERE] ... x6w9MsYHzFWzmbZUP/2Q==". 

Two things should change here:

1. 'image/jpg' should be whitelisted as an Image URL type.
2. URLs in this error message should be `trimMiddle`d. I thought the change we made in http://trac.webkit.org/changeset/131353 would take care of this, but it apparently uses a different code path.
Comment 1 Mike West 2012-10-23 02:02:51 PDT
(In reply to comment #0)
> Flickr.com has tons of MIME-type errors like:
> 
>     Resource interpreted as Image but transferred with MIME type image/jpg: "data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD ... [STUNNINGLY LONG URL TRUNCATED HERE] ... x6w9MsYHzFWzmbZUP/2Q==". 
> 
> Two things should change here:
> 
> 1. 'image/jpg' should be whitelisted as an Image URL type.
> 2. URLs in this error message should be `trimMiddle`d. I thought the change we made in http://trac.webkit.org/changeset/131353 would take care of this, but it apparently uses a different code path.

It looks like the linkifier regex doesn't match data: URLs. I'll have a patch up in a few minutes.
Comment 2 Mike West 2012-10-23 02:15:28 PDT
Created attachment 170089 [details]
Patch
Comment 3 WebKit Review Bot 2012-10-23 09:09:53 PDT
Comment on attachment 170089 [details]
Patch

Clearing flags on attachment: 170089

Committed r132231: <http://trac.webkit.org/changeset/132231>
Comment 4 WebKit Review Bot 2012-10-23 09:09:57 PDT
All reviewed patches have been landed.  Closing bug.