Welcome to the CHICKEN Scheme pasting service
chicken-install: Handle chunk read error added by mario-goulart on Thu Sep 25 21:08:59 2025
diff --git a/egg-download.scm b/egg-download.scm
index 388fa35f..6d6b71fb 100644
--- a/egg-download.scm
+++ b/egg-download.scm
@@ -135,9 +135,11 @@
(process-headers)
(when chunked
(d "reading chunks ")
- (let ((data (read-chunks in)))
+ (let ((data (handle-exceptions _ #f (read-chunks in))))
(close-input-port in)
- (set! in (open-input-string data))) )
+ (if data
+ (set! in (open-input-string data))
+ (server-error "error reading chunks")) ) )
(values in out datalen))
(else (network-failure "invalid response from server" h1)))))))