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:
parent
4923286d96
commit
e3d252c370
|
@ -237,6 +237,7 @@
|
||||||
;;; it into a real HTTP response, which we then send back to the HTTP client.
|
;;; it into a real HTTP response, which we then send back to the HTTP client.
|
||||||
|
|
||||||
(define (cgi-make-response script-port path req)
|
(define (cgi-make-response script-port path req)
|
||||||
|
(set-port-buffering script-port bufpol/block 4096)
|
||||||
(let* ((headers (read-rfc822-headers script-port))
|
(let* ((headers (read-rfc822-headers script-port))
|
||||||
(ctype (get-header headers 'content-type))
|
(ctype (get-header headers 'content-type))
|
||||||
(loc (get-header headers 'location))
|
(loc (get-header headers 'location))
|
||||||
|
@ -271,7 +272,7 @@
|
||||||
extra-headers
|
extra-headers
|
||||||
(make-writer-body
|
(make-writer-body
|
||||||
(lambda (out options)
|
(lambda (out options)
|
||||||
(copy-inport->outport script-port out)
|
(copy-inport->outport script-port out 4096)
|
||||||
(close-input-port script-port)))))))
|
(close-input-port script-port)))))))
|
||||||
|
|
||||||
(define (delete-headers headers tag)
|
(define (delete-headers headers tag)
|
||||||
|
|
Loading…
Reference in New Issue