This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19494 - Data URI Composition and Consumption
Summary: Data URI Composition and Consumption
Status: RESOLVED MOVED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: URL (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: Unsorted
Assignee: Simon Sapin
QA Contact: sideshowbarker+urlspec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-12 03:17 UTC by Michael A. Puls II
Modified: 2015-08-19 09:27 UTC (History)
5 users (show)

See Also:


Attachments

Description Michael A. Puls II 2012-10-12 03:17:42 UTC
Here's some info about data URIs that may be useful in your research:
 
My data URI composer at <http://shadow2531.com/js/create_data_uris.html> is based off of stuff I learned about data URIs when writing some patches for <https://bugzilla.mozilla.org/show_bug.cgi?id=548516>. Firefox's data URI parsing code is very simple to the point that the metadata in the URI has to be perfect or Firefox will break.
 
The bug has a lot of comments. But, there are multiple ways of parsing and handling data URIs and browsers don't exactly do the same. Opera and Safari for example seem to parse data URIs like a mime header named "data" (after percent-decoding the first part of the data URI). One of my proposed patches makes Firefox work like that too. Firefox right now just does very basic (and brittle) string processing.
 
In the public-uri list, I have a few threads with stuff like this.
 
"data URIs - filename and content-disposition" (<http://lists.w3.org/Archives/Public/uri/2010Mar/0004.html>)
"Data URI handlng (was: Re: data URIs - filename and content-disposition)" (<http://lists.w3.org/Archives/Public/uri/2012Mar/0000.html>)
 
There's also <http://shadow2531.com/opera/testcases/datauri/data_uri_rules.html> that I came up with a while ago for parsing data URIs. The idea of that was to make Firefox's code less brittle and add support for filename and content-disposition threads. It's an old draft, so don't read too much into it. But, it shows things to think about when parsing data URIs.
Comment 1 Julian Reschke 2012-11-28 16:56:55 UTC
I have some more tests at http://greenbytes.de/tech/tc/datauri/
Comment 3 Anne 2013-11-21 12:57:03 UTC
http://simonsapin.github.io/data-urls/
Comment 4 Anne 2014-05-22 10:36:00 UTC
I suppose we could at some point integrate this into the URL Standard. Leaving component unchanged for now.
Comment 5 Anne 2015-08-19 09:27:10 UTC
Closing this in favor of https://github.com/whatwg/url/issues/68. Not much progress yet I'm afraid, though if someone is up to it help is still welcome.