Re: [whatwg/fetch] data URLs: revised specification (#234)

> First you run the URL parser over a data URL string to get a URL record. That URL record is the input to the data URL processor (or whatever we call it) which ends up returning a response (this is the algorithm Fetch will invoke from Scheme Fetch and also define someplace).

I was hoping there'd be some intermediate algorithm that takes a URL record (or perhaps just a path string) and returns you a tuple like (MIME type, byte sequence) (maybe with text encoding too? Or just MIME parameters in general?). This algorithm would then live in the URL Standard.

That feels like something that'd be easier to reuse across environments or as part of larger pipelines. And in general just give a good factoring of "data URL processing" separate from fetching.

WDYT?

-- 
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/issues/234#issuecomment-322214678

Received on Monday, 14 August 2017 15:02:04 UTC