Skip to content

Commit

Permalink
Fix gxhttpd bug: No content length when chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
drewc committed Jan 15, 2025
1 parent f340b5e commit 563cb35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tools/gxhttpd.ss
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
(mux (make-mux cfg))
(request-logger (get-request-logger cfg))
(addresses (config-get! cfg listen:))
(max-token-length (: (config-get cfg max-token-length: 1024) :fixnum))
(max-token-length (: (config-get cfg max-token-length: 1024) :fixnum))
(run-httpd
(lambda ()
(set-httpd-max-token-length! max-token-length)
Expand Down Expand Up @@ -501,6 +501,9 @@
(using (req :- http-request)
(case req.method
((GET)
;; RFC 9112 states that "a sender (server) MUST NOT send
;; a Content-Length header field in any message that
;; contains a Transfer-Encoding header field.".
(http-response-file res (cdr headers) path))
((HEAD)
(http-response-write res 200 headers #f))
Expand Down

0 comments on commit 563cb35

Please sign in to comment.