+ Use a port buffer of 4096 bytes for the socket's output port.
+ Comment why we cannot do the same for input.
This commit is contained in:
parent
e3d252c370
commit
7f81f8bed9
|
@ -47,9 +47,6 @@
|
||||||
(cond ((httpd-options-post-bind-thunk options)
|
(cond ((httpd-options-post-bind-thunk options)
|
||||||
=> (lambda (thunk)
|
=> (lambda (thunk)
|
||||||
(thunk)))))
|
(thunk)))))
|
||||||
;; Why is the output socket unbuffered? So that if the client
|
|
||||||
;; closes the connection, we won't lose when we try to close the
|
|
||||||
;; socket by trying to flush the output buffer.
|
|
||||||
(lambda (sock addr)
|
(lambda (sock addr)
|
||||||
(if rate-limiter
|
(if rate-limiter
|
||||||
(begin
|
(begin
|
||||||
|
@ -71,9 +68,11 @@
|
||||||
(format-internet-host-address host-address)
|
(format-internet-host-address host-address)
|
||||||
(rate-limiter-current-requests rate-limiter)))
|
(rate-limiter-current-requests rate-limiter)))
|
||||||
|
|
||||||
(set-port-buffering (socket:outport sock) bufpol/none) ; No buffering
|
(set-port-buffering (socket:outport sock) bufpol/block 4096)
|
||||||
(fork-thread
|
(fork-thread
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
;; If there is buffering for the input,
|
||||||
|
;; CGI scripts don't get the full request
|
||||||
(set-port-buffering (socket:inport sock) bufpol/none)
|
(set-port-buffering (socket:inport sock) bufpol/none)
|
||||||
(process-toplevel-request sock host-address options)
|
(process-toplevel-request sock host-address options)
|
||||||
(if (http-syslog?)
|
(if (http-syslog?)
|
||||||
|
|
Loading…
Reference in New Issue