W3C home > Mailing lists > Public > ietf-http-wg@w3.org > July to September 2012

Re: FYI... Binary Optimized Header Encoding for SPDY

From: Roberto Peon <grmocg@gmail.com>
Date: Mon, 6 Aug 2012 09:28:48 -0700
Message-ID: <CAP+FsNcDneyd8aRnr8+Ex5ftWdTXGhFV4Zq8ZoA+5LrJGjVnOg@mail.gmail.com>
To: Martin J. Dürst <duerst@it.aoyama.ac.jp>
Cc: Jonathan Ballard <dzonatas@gmail.com>, Poul-Henning Kamp <phk@phk.freebsd.dk>, James M Snell <jasnell@gmail.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>, Mike Belshe <mike@belshe.com>
On Aug 6, 2012 12:21 AM, Martin J. Dürst <duerst@it.aoyama.ac.jp> wrote:
>
> On 2012/08/04 2:33, Roberto Peon wrote:
>>
>> I'm biased against utf-8, because it is trivial at the application layer
to
>> write a function which encodes and/or decodes it.
>
>
> It's maybe trivial to write such functions once, but it's a total waste
of time to write them over and over.

But they don't... it is almost always a single function call where the
function is provided to them.

>
>
>> I see that handling utf-8 adds complexity
>
>
> What complexity?

Reencoding to ASCII for http/1.1, checking that all the characters are
actually displayable, parsing the dang strings in the cases where it does
wish to encode a multi byte character.

I don't see why proxies should have to do this. I don't care, however, so
long as a distinction is made for opaque (user set) headers, at which point
you could use an xor encoding for all I care.
>
>
>> to the protocol but buys the
>> protocol nothing.
>
>
> It doesn't buy the protocol itself much. But it buys the users of the
protocol a lot.

Which users? I'm having a hard time imagining why metadata has to be utf-8.

>
>
>> It adds minimal advantage for the entities using the
>> protocol, and makes intermediaries lives more difficult since they'll
have
>> to do more verification.
>>
>> Saying that the protocol handles sending a length-delimited string or a
>> string guaranteed not to include '\n' would be fine, however, as at that
>> point whatever encoding is used in any particular header value is matter
of
>> the client-app and server, as it should be for things that the protocol
>> doesn't need to know about.
>
>
> No, it is not fine. First, for most headers, interoperability should be
between all clients and all servers.

The person who wrote the application also controls the server. They will
interpret the byte stream how they see fit.
It is the other parties to the exchange that won't-- forward and reverse
proxies, for instance.

> Second, it is absolutely no fun for client apps developers to solve the
same character encoding problem again and again. It's just useless work,
prone to errors.

No disagreement there. Am I wrong about such functions already being
provided to such client app writers?

> If you got told today that the host header can be in ASCII or EBCDIC,
it's just between your client and your server, what would you say?

I'd say to ignore EBCDIC in more colorful words :)
-=R

>
> Regards,    Martin.
Received on Monday, 6 August 2012 16:29:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 6 August 2012 16:29:27 GMT