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.
This commit is contained in:
mainzelm 2003-02-26 18:02:14 +00:00
parent 4923286d96
commit e3d252c370
1 changed files with 2 additions and 1 deletions

View File

@ -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)