From 1ddbfe2be6d7bbafe742237df7432685ac4d54ed Mon Sep 17 00:00:00 2001 From: Peter Bex Date: Sat, 28 Nov 2015 18:02:44 +0100 Subject: [PATCH] Attempt to detect server errors and translate them to an exception. Fixes #1110, albeit not very cleanly. A proper fix would involve specifying a more rigorous protocol, but that's hard to do while being backward-compatible. Henrietta should return only s-expressions, but there are situations where it won't. It's also impossible to detect when we're talking to a non-Henrietta web server. --- setup-download.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup-download.scm b/setup-download.scm index 41de68e..35a1a6a 100644 --- a/setup-download.scm +++ b/setup-download.scm @@ -355,6 +355,8 @@ (else (set! version v))) (open-input-string ln)))) + ((irregex-match "^[ ]*\\(error .*\\)[ ]*$" ln) + (open-input-string ln)) ; get-files deals with errors ((string-every char-set:whitespace ln) (skip)) (else -- 2.1.4