mod-lisp calls setvbuf only once
* tekuti/mod-lisp.scm (mod-lisp-read): Like the http impl, just setvbuf once, and don't throw away data (!).
This commit is contained in:
parent
68966d9e17
commit
98cac18528
1 changed files with 2 additions and 4 deletions
|
@ -219,8 +219,8 @@
|
|||
;;
|
||||
;; FIXME: preserve meta-info.
|
||||
(let ((client (accept (poll-set-port poll-set idx))))
|
||||
;; Set line buffering while reading the request.
|
||||
(setvbuf (car client) _IOLBF)
|
||||
;; Fully buffered.
|
||||
(setvbuf (car client) _IOFBF)
|
||||
;; From "HOP, A Fast Server for the Diffuse Web", Serrano.
|
||||
(setsockopt (car client) SOL_SOCKET SO_SNDBUF (* 12 1024))
|
||||
(poll-set-add! poll-set (car client) *events*)
|
||||
|
@ -246,8 +246,6 @@
|
|||
#t
|
||||
(lambda ()
|
||||
(let ((req (read-request/mod-lisp port)))
|
||||
;; Block buffering for reading body and writing response.
|
||||
(setvbuf port _IOFBF)
|
||||
(values port
|
||||
req
|
||||
(read-request-body/latin-1 req))))
|
||||
|
|
Loading…
Reference in a new issue