+ 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:
mainzelm 2003-02-26 18:03:40 +00:00
parent e3d252c370
commit 7f81f8bed9
1 changed files with 4 additions and 5 deletions

View File

@ -47,9 +47,6 @@
(cond ((httpd-options-post-bind-thunk options)
=> (lambda (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)
(if rate-limiter
(begin
@ -71,9 +68,11 @@
(format-internet-host-address host-address)
(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
(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)
(process-toplevel-request sock host-address options)
(if (http-syslog?)