W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2013

Re: [whatwg] Fetch: please review!

From: Janusz Majnert <j.majnert@samsung.com>
Date: Wed, 22 May 2013 13:20:13 +0200
Message-id: <519CA9ED.9010605@samsung.com>
To: whatwg@lists.whatwg.org
Hi,

On 2013-05-22 11:50, Anne van Kesteren wrote:
> I'm reaching the point where I want to start integrating
> http://fetch.spec.whatwg.org/ into http://xhr.spec.whatwg.org/ so I
> can remove a lot of the duplicate requirements with respect to
> networking and at the same time clarify a lot of the networking
> behavior.
>
> And although http://fetch.spec.whatwg.org/ is pretty dry reading it
> would be good if people could take a look at it as the idea is for it
> to define the fetching behavior across the platform. This task is
> currently divided between HTML, CORS, Web Origin Concept, and CSP
> (integration hooks not yet in Fetch) and creates a real messy
> situation for specifications building on top of them. The idea is to
> remove that complexity and have a simple hook for fetching a request
> and get a response in return.
>

I have a few notes to make on the use of "byte string" notion.
First of all, let's look at the definition of "byte string":
"A byte string is a byte sequence written down as a string."
Where "byte" and "string" are:
"A byte is a sequence of eight bits, represented as a double-digit 
hexadecimal number in the range 0x00 to 0xFF."
"A string is a sequence of code points." and later "A code point is a 
Unicode code point and is represented as a four-to-six digit hexadecimal 
number, typically prefixed with "U+"."

So, just by looking at the definition, I would expect a byte string to 
be a sequence of hex numbers. That is of course not what is put in the 
examples and not what this definition aimed for.

The second note is more of a question: why is the "byte string" even 
used? Why not use just string? The document contains just one occurrence 
of plain "string" and could very well be replaced with a byte string.

And now for some things I think are errors:
* in section "4.5 CORS check", point 4 reads "If request's origin 
serialized to bytes is not result, return failure." I think it should be 
"...serialized to byte string..."
* in section "4.1 Basic fetch", "about" bullet reads: "... header whose 
name is Content-Type and value is "text/html;charset=utf-8", and...". I 
think, as the value of a header is defined to be a byte string, that 
there should be no quotation marks around text/html;charset=utf-8.


Best regards,
Janusz Majnert
Samsung R&D Institute Poland
Samsung Electronics
Received on Wednesday, 22 May 2013 11:21:04 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:59 UTC