On Thu, Mar 01, 2018 at 09:38:10AM +0000, Robert Samuel Newson wrote:
> Yup, agreed, the frame-only transfers are only really implied in the spec
> (8.1.2.6's, "A request or response that includes a payload body _can_ include
> a content-length header field", my emphasis). The http 2 spec does
> specifically prohibit the transfer-encoding: chunked header, again implying
> that the framing mechanism subsumes it.

In fact it's even worse for me : I identified I had to do it, as indicated
by the comments on top of function h2_frt_transfer_data() which claim that
when no C-L nor tunnel is found, chunks are emitted. But apparently relying
too much on the checks I had on the paper-written RFC allowed me to completely
forget about this part! I've checked if I had a temporary implementation in
one of my previous dev branches but no, so I think I never wrote that code.
The good point is that the code was written with this in mind, so I hope I
won't face too big a surprise (and none of the usual "ah now I remember why").

> There are a few libraries (like https://github.com/go-kivik/couchdb) which
> implement PUT without sending Content-Length, but other tools, like good old
> curl, which do send it.

Good to know, thanks for the links. Indeed, curl always used C-L.

> The basic plan to transform to a chunked transfer encoding sounds right to
> me, and I'll keep an eye out for commits, I'm happy to test it out.

Thanks!
Willy

Reply via email to