Re: [XHR]

Hallvord et al.

Le 16 mars 2016 à 20:04, Hallvord Reiar Michaelsen Steen <> a écrit :
> How would you parse for example an incomplete JSON source to expose an
> object? Or incomplete XML markup to create a document? Exposing
> partial responses for text makes sense - for other types of data
> perhaps not so much.

I don't think you are talking about the same "parse".

The RFC 7230 corresponding section is:

This is the HTTP specification. The content of the specification is about parsing **HTTP** information, not about parsing the content of a body. A JSON, XML, HTML parser is not the domain of HTTP. It's a separate piece of code. 

Note also for JSON or XML, an incomplete transfert or chunked as text or binary means you can still receive the stream of bytes and choose to serialize it as text or binary, which a JSON or XML processing tool decide to do whatever they want with it. The same way a validating parser would start parsing **something** (as long as it's not completed) and bails out when it finds it invalid. 

Karl Dubost 🐄

Received on Thursday, 17 March 2016 02:20:19 UTC