summaryrefslogtreecommitdiff
path: root/Utility/Url.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utility/Url.hs')
-rw-r--r--Utility/Url.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/Utility/Url.hs b/Utility/Url.hs
index 9c5d6a708..1d34b558f 100644
--- a/Utility/Url.hs
+++ b/Utility/Url.hs
@@ -123,10 +123,14 @@ getUrlInfo url uo = case parseURIRelaxed url of
| Build.SysConfig.curl -> do
output <- catchDefaultIO "" $
readProcess "curl" $ toCommand curlparams
+ let len = extractlencurl output
+ let good = found len Nothing
case lastMaybe (lines output) of
- Just ('2':_:_) -> found
- (extractlencurl output)
- Nothing
+ Just ('2':_:_) -> good
+ -- don't try to parse ftp status
+ -- codes; if curl got a length,
+ -- it's good
+ _ | "ftp" `isInfixOf` uriScheme u && isJust len -> good
_ -> dne
| otherwise -> dne
Nothing -> dne