summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
Diffstat (limited to 'Remote')
-rw-r--r--Remote/External.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Remote/External.hs b/Remote/External.hs
index 1a43a1ca7..7e2b2d0b0 100644
--- a/Remote/External.hs
+++ b/Remote/External.hs
@@ -435,6 +435,10 @@ checkurl external url =
handleRequest external (CHECKURL url) Nothing $ \req -> case req of
CHECKURL_CONTENTS sz f -> Just $ return $ UrlContents sz
(if null f then Nothing else Just f)
+ -- Treat a single item multi response specially to
+ -- simplify the external remote implementation.
+ CHECKURL_MULTI ((_, sz, f):[]) ->
+ Just $ return $ UrlContents sz (Just f)
CHECKURL_MULTI l -> Just $ return $ UrlMulti l
CHECKURL_FAILURE errmsg -> Just $ error errmsg
UNSUPPORTED_REQUEST -> error "CHECKURL not implemented by external special remote"