From 9281dcaaff99518ee735488c8bdf1e9ede3c4225 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Thu, 18 Nov 2021 17:23:17 +0000 Subject: [PATCH] fix spec reference --- actix-http/src/h1/encoder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actix-http/src/h1/encoder.rs b/actix-http/src/h1/encoder.rs index e8e71e35a..cc26a200f 100644 --- a/actix-http/src/h1/encoder.rs +++ b/actix-http/src/h1/encoder.rs @@ -78,8 +78,8 @@ pub(crate) trait MessageType: Sized { } StatusCode::NOT_MODIFIED => { - // don't skip content-length header for not modified responses - // see https://datatracker.ietf.org/doc/html/rfc7232#section-4.1 + // 304 responses should never have a body but should retain a manually set + // content-length header see https://tools.ietf.org/html/rfc7232#section-4.1 skip_len = false; length = BodySize::None; }