diff --git a/.release-notes/set-content-length.md b/.release-notes/set-content-length.md new file mode 100644 index 0000000..f3309c4 --- /dev/null +++ b/.release-notes/set-content-length.md @@ -0,0 +1,3 @@ +## Always set Content-Length + +There was a bug where the Content-Length header could end up not being sent. This would cause many clients (such as curl) to hang. diff --git a/http_server/response.pony b/http_server/response.pony index 0432370..43cfdc7 100644 --- a/http_server/response.pony +++ b/http_server/response.pony @@ -298,8 +298,8 @@ class val BuildableResponse is (Response & ByteSeqIter) match cl | let clu: USize => set_header("Content-Length", cl.string()) - // | None => - // TODO: drop header + | None => + set_header("Content-Length", "0") end this