From c171097deaff3fbbd41ce511ba9726c8df0e92eb Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 3 Nov 2016 23:09:30 +0900 Subject: [PATCH] Document that libnghttp2's behaviour about Content-Length --- doc/programmers-guide.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/programmers-guide.rst b/doc/programmers-guide.rst index 2e763a40..e03b7a14 100644 --- a/doc/programmers-guide.rst +++ b/doc/programmers-guide.rst @@ -173,6 +173,11 @@ parsed as 64 bit signed integer. The sum of data length in the following DATA frames must match with the number in "Content-Length" header field if it is present (this does not include padding bytes). +RFC 7230 says that server must not send "Content-Length" in any +response with 1xx, and 204 status code. It also says that +"Content-Length" is not allowed in any response with 200 status code +to a CONNECT request. nghttp2 enforces them as well. + Any deviation results in stream error of type PROTOCOL_ERROR. If error is found in PUSH_PROMISE frame, stream error is raised against promised stream.