publish: Use 'sendfile' when possible.
* guix/scripts/publish.scm (http-write): In the 'application/octet-stream' case, use 'sendfile' when OUTPUT is a file port.
This commit is contained in:
parent
905ae5276d
commit
339a79fd6a
|
@ -469,7 +469,9 @@ blocking."
|
|||
size)
|
||||
client))
|
||||
(output (response-port response)))
|
||||
(dump-port input output)
|
||||
(if (file-port? output)
|
||||
(sendfile output input size)
|
||||
(dump-port input output))
|
||||
(close-port output)
|
||||
(values)))))
|
||||
(lambda args
|
||||
|
|
Loading…
Reference in New Issue