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.
|
;; FIXME: preserve meta-info.
|
||||||
(let ((client (accept (poll-set-port poll-set idx))))
|
(let ((client (accept (poll-set-port poll-set idx))))
|
||||||
;; Set line buffering while reading the request.
|
;; Fully buffered.
|
||||||
(setvbuf (car client) _IOLBF)
|
(setvbuf (car client) _IOFBF)
|
||||||
;; From "HOP, A Fast Server for the Diffuse Web", Serrano.
|
;; From "HOP, A Fast Server for the Diffuse Web", Serrano.
|
||||||
(setsockopt (car client) SOL_SOCKET SO_SNDBUF (* 12 1024))
|
(setsockopt (car client) SOL_SOCKET SO_SNDBUF (* 12 1024))
|
||||||
(poll-set-add! poll-set (car client) *events*)
|
(poll-set-add! poll-set (car client) *events*)
|
||||||
|
@ -246,8 +246,6 @@
|
||||||
#t
|
#t
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let ((req (read-request/mod-lisp port)))
|
(let ((req (read-request/mod-lisp port)))
|
||||||
;; Block buffering for reading body and writing response.
|
|
||||||
(setvbuf port _IOFBF)
|
|
||||||
(values port
|
(values port
|
||||||
req
|
req
|
||||||
(read-request-body/latin-1 req))))
|
(read-request-body/latin-1 req))))
|
||||||
|
|
Loading…
Reference in a new issue