Subject: 100 Continue editorial comment

From: Greg Wilkins <[email-masked]>
Date: Tue, 5 Aug 2014 16:13:01 +1000

Just implementing 100 continues support and realise we need another
exception to Malformed Requests:

In http://tools.ietf.org/html/draft-ietf-httpbis-http2-14#section-8.1.2.6,
the text says:

   A request or response that includes an entity body can include a
   "content-length" header field.  A request or response is also
   malformed if the value of a "content-length" header field does not
   equal the sum of the DATA frame payload lengths that form the body,
   with the exception of responses to HEAD requests, which always
   contain no DATA frames.

I believe that we also need to add an exception for requests that are
expecting 100 continues but that receive another response.   In HTTP/1.1,
that would cause the connection to be closed, but in HTTP/2 I assume it
will mean the client should just close the stream (empty DATA frame with
END_STREAM flag?).

So perhaps the text should be something like:

   A request or response that includes an entity body can include a
   "content-length" header field.  A request or response is also
   malformed if the value of a "content-length" header field does not
   equal the sum of the DATA frame payload lengths that form the body,
   with the exception of:

    * responses to HEAD requests, which always contain no DATA frames.

    * request that were expecting a 100 Continue but received a
terminal response.

cheers

-- 
Greg Wilkins <[email-masked]>
http://eclipse.org/jetty HTTP, SPDY, Websocket server and client that scales
http://www.webtide.com  advice and support for jetty and cometd.

---

From: Martin Thomson <[email-masked]>
Date: Tue, 5 Aug 2014 08:59:11 -0700

I've already had comments regarding this.

On 4 August 2014 23:13, Greg Wilkins <[email-masked]> wrote:
> * request that were expecting a 100 Continue but received a terminal
> response.

That's actually completely valid.  If you are expecting continue, but
you get a final response, your body isn't needed.  That said, you do
need to complete your request to allow the stream state to be cleaned
up.