Stream the package derivation page since it can be large
This commit is contained in:
parent
bbbcea8ff6
commit
5f8cd2dc56
2 changed files with 13 additions and 6 deletions
|
|
@ -748,7 +748,8 @@
|
|||
(valid-targets->options targets)
|
||||
build-status-strings
|
||||
build-server-urls
|
||||
derivation-changes))))))))))))
|
||||
derivation-changes)
|
||||
#:stream? #t)))))))))))
|
||||
|
||||
(define (render-compare-by-datetime/package-derivations mime-types
|
||||
query-parameters)
|
||||
|
|
|
|||
|
|
@ -139,17 +139,23 @@
|
|||
#f)))
|
||||
|
||||
(define* (render-html #:key sxml (extra-headers '())
|
||||
(code 200))
|
||||
(code 200)
|
||||
stream?)
|
||||
(list (build-response
|
||||
#:code code
|
||||
#:headers (append extra-headers
|
||||
'((content-type . (text/html
|
||||
(charset . "utf-8")))
|
||||
(vary . (accept)))))
|
||||
(call-with-encoded-output-string
|
||||
"utf-8"
|
||||
(lambda (port)
|
||||
(sxml->html sxml port)))))
|
||||
(if stream?
|
||||
(lambda (port)
|
||||
(set-port-encoding! port "utf-8")
|
||||
(setvbuf port 'block (expt 2 20))
|
||||
(sxml->html sxml port))
|
||||
(call-with-encoded-output-string
|
||||
"utf-8"
|
||||
(lambda (port)
|
||||
(sxml->html sxml port))))))
|
||||
|
||||
(define* (render-json json #:key (extra-headers '())
|
||||
(code 200)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue