Bug 20045 - data: URLs, HTTP, and parsing
data: URLs, HTTP, and parsing
Status: RESOLVED FIXED
Product: WHATWG
Classification: Unclassified
Component: Fetch
unspecified
PC Windows 3.1
: P2 normal
: Unsorted
Assigned To: Anne
sideshowbarker+fetchspec
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-22 16:00 UTC by Anne
Modified: 2013-04-12 12:43 UTC (History)
3 users (show)

See Also:


Attachments

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