From e3d252c370ec3d4aa384c000f912a27a78527541 Mon Sep 17 00:00:00 2001 From: mainzelm Date: Wed, 26 Feb 2003 18:02:14 +0000 Subject: [PATCH] Use a port buffer of 4096 bytes when reading the CGI script's output and copy 4094 bytes at once from this buffer to output port. --- scheme/httpd/cgi-server.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scheme/httpd/cgi-server.scm b/scheme/httpd/cgi-server.scm index f9a9b75..8882453 100644 --- a/scheme/httpd/cgi-server.scm +++ b/scheme/httpd/cgi-server.scm @@ -237,6 +237,7 @@ ;;; it into a real HTTP response, which we then send back to the HTTP client. (define (cgi-make-response script-port path req) + (set-port-buffering script-port bufpol/block 4096) (let* ((headers (read-rfc822-headers script-port)) (ctype (get-header headers 'content-type)) (loc (get-header headers 'location)) @@ -271,7 +272,7 @@ extra-headers (make-writer-body (lambda (out options) - (copy-inport->outport script-port out) + (copy-inport->outport script-port out 4096) (close-input-port script-port))))))) (define (delete-headers headers tag)