From dcfe696fbbd86cde63c3eed1c641ecc9a081f0d1 Mon Sep 17 00:00:00 2001 From: Nikolay Krashnikov <1090219@mail.ru> Date: Sun, 2 Aug 2020 00:45:29 +0300 Subject: [PATCH] doc: add HPE_UNEXPECTED_CONTENT_LENGTH error description PR-URL: https://github.com/nodejs/node/pull/34596 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: Ricky Zhou <0x19951125@gmail.com> --- doc/api/errors.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/api/errors.md b/doc/api/errors.md index c152e86d0935f7..a79f0b2a989daa 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -2215,6 +2215,17 @@ malconfigured clients, if more than 8KB of HTTP header data is received then HTTP parsing will abort without a request or response object being created, and an `Error` with this code will be emitted. + +### `HPE_UNEXPECTED_CONTENT_LENGTH` + +Server is sending both a `Content-Length` header and `Transfer-Encoding: chunked`. + +`Transfer-Encoding: chunked` allows the server to maintain an HTTP persistent +connection for dynamically generated content. +In this case, the `Content-Length` HTTP header cannot be used. + +Use `Content-Length` or `Transfer-Encoding: chunked`. + ### `MODULE_NOT_FOUND`