diff options
author | Andy Wingo | 2010-12-06 20:01:43 +0100 |
---|---|---|
committer | Andy Wingo | 2010-12-06 20:01:43 +0100 |
commit | 98cac185284dea42a31ab412f15017939d7a48eb (patch) | |
tree | b1d667ba44611312aa86d5c644e18b657fb00944 | |
parent | 68966d9e176bde885a083c81b8aef1887a0c3d9c (diff) | |
download | tekuti-98cac185284dea42a31ab412f15017939d7a48eb.tar.gz tekuti-98cac185284dea42a31ab412f15017939d7a48eb.zip |
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 (!).
-rw-r--r-- | tekuti/mod-lisp.scm | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tekuti/mod-lisp.scm b/tekuti/mod-lisp.scm index b16dab7..59002b7 100644 --- a/tekuti/mod-lisp.scm +++ b/tekuti/mod-lisp.scm @@ -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)))) |