Re: If not JSON, what then ?

Hi Poul-Henning,

I've read this a bit quickly but had a thought regarding this :

On Mon, Aug 01, 2016 at 07:43:34AM +0000, Poul-Henning Kamp wrote:
> 2) Ascii strings
> ----------------
> 
> I'm not sure if we need these or if they are even a good idea.

That made me think that most of the header fields I'm seeing do not use
non-ascii characters at all, I'd even say non-printable-ascii. Most of
them contain :
  - host names (Host)
  - uris (Referer, Location)
  - user-agent strings (UA)
  - tokens (Connection, Accept, ...)
  - numbers

Thus in fact I'm wondering if it's really worth focusing the efforts on
non-ascii strings instead. I think we should be able to support them, but
not try to save too many resources on them if this comes at the expense of
the rest of the encoding, or with extra implementation complexity and/or
risks of vulnerabilities (eg: when an unterminated utf-8 sequence precedes
an LF character, I've seen some parsers consume that LF as part of the
character thus not seeing it as a line delimiter).

Just a few thoughts anyway. I'll take more time reading everything in
details, but for now I'm seeing good stuff here overall.

Cheers,
Willy

Received on Monday, 1 August 2016 09:00:25 UTC