summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Turner <jturner.usa@gmail.com>2026-03-05 03:19:43 -0500
committerJohn Turner <jturner.usa@gmail.com>2026-03-05 03:19:43 -0500
commitf3d6bceeffa043e7cbc626926ce75562d26fda78 (patch)
treedf52d659729f3ebb12856bfb3e4b290c82ccfcd7 /src
parent54a5e893bc4255f833c9ded1f0c853a977e004d5 (diff)
downloadhttpd-f3d6bceeffa043e7cbc626926ce75562d26fda78.tar.gz
return content-length: 0 on 500 Internal Server Error
Diffstat (limited to 'src')
-rw-r--r--src/main.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index f3ba157..b422f47 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -114,6 +114,7 @@ async fn response(handlers: Table, stream: TcpStream) -> Result<(), ResponseErro
Response::builder()
.status(Status::InternalServerError)
+ .headers([("content-length", "0")])
.body(response::Body::Empty)
}
};