Re: [whatwg/fetch] Define data: URLs (#579)

It would help if we can get more specific here. Note that due to step 1.3 and step 3 of https://url.spec.whatwg.org/#concept-basic-url-parser by the time the URL is handed to the `data:` URL processor a lot of whitespace has already been removed. Furthermore, in https://url.spec.whatwg.org/#cannot-be-a-base-url-path-state the remaining whitespace except space is percent-encoded.

So then here, when it says split on "," and then strip whitespace from the first returned string, it'll only remove leading and trailing spaces (U+0020) that are left. Note that https://mimesniff.spec.whatwg.org/#parsing-a-mime-type strips whitespace too.

So the only observable change with respect to spaces we could make here is to make the base64 check earlier so any trailing space would result in a mismatch.

Is that the argument you're making @achristensen07?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/579#issuecomment-358586364

Received on Thursday, 18 January 2018 09:22:03 UTC