Configure the knots web server connection buffer size

Rather than changing the buffer size when processing each request.
This commit is contained in:
Christopher Baines 2025-01-29 16:34:16 +00:00
parent 98c4fae76f
commit 8f3968af1e

View file

@ -75,10 +75,6 @@
(request-method request) (request-method request)
(uri-path (request-uri request))))) (uri-path (request-uri request)))))
#:unwind? #t) #:unwind? #t)
;; The fibers web server uses a 1024 byte buffer, so increase this
(setvbuf (request-port request)
'block
(expt 2 16))
(apply values (apply values
(let-values (((request-components mime-types) (let-values (((request-components mime-types)
(request->path-components-and-mime-type request))) (request->path-components-and-mime-type request)))
@ -294,6 +290,7 @@ port. Also, the port used can be changed by passing the --port option.\n"
exn exn
#f)) #f))
#:code 500)))))) #:code 500))))))
#:connection-buffer-size (expt 2 16)
#:host host #:host host
#:port port))) #:port port)))
#:unwind? #t))) #:unwind? #t)))