Bug 100083

Summary: Web Inspector: MIME type errors should truncate long URLs.
Product: WebKit Reporter: Mike West <mkwst>
Component: Web Inspector (Deprecated)Assignee: Mike West <mkwst>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, keishi, loislo, pfeldman, pmuellr, vsevik, web-inspector-bugs, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 100196    
Bug Blocks: 97978    
Attachments:
Description Flags
Patch none

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.