simplify external special remote implementation
This commit is contained in:
parent
f41ce65ef4
commit
8a17bcb0be
1 changed files with 4 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue