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 20045 - data: URLs, HTTP, and parsing
Summary: data: URLs, HTTP, and parsing
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: Fetch (show other bugs)
Version: unspecified
Hardware: PC Windows 3.1
: P2 normal
Target Milestone: Unsorted
Assignee: Anne
QA Contact: sideshowbarker+fetchspec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-22 16:00 UTC by Anne
Modified: 2013-04-12 12:43 UTC (History)
3 users (show)

See Also:


Attachments

Description Anne 2012-11-22 16:00:14 UTC
data: URLs almost always successfully parse per the URL parser, but the URL processing step can go wrong. Maybe if that goes wrong it should be a 400 Bad Request? Or maybe 500 Internal Server Error?

So e.g.

data:test

parses fine as a URL, but does not parse fine as a data: URL.
Comment 1 Anne 2012-11-22 16:00:44 UTC
This question relates to http://xhr.spec.whatwg.org/#data:-urls-and-http by the way.
Comment 2 Julian Reschke 2012-11-23 06:59:57 UTC
(In reply to comment #0)
> data: URLs almost always successfully parse per the URL parser, but the URL
> processing step can go wrong. Maybe if that goes wrong it should be a 400
> Bad Request? Or maybe 500 Internal Server Error?
> 
> So e.g.
> 
> data:test
> 
> parses fine as a URL, but does not parse fine as a data: URL.

Sounds right to me. However, I would just require 4xx (and state that 400 is fine), in case we ever define a more specific status code.
Comment 3 Anne 2013-04-12 12:43:40 UTC
This is fixed, also in XHR for now. Failure to parse will generate a network error.