Add ftp:// protocol support for git-http-fetch
Based on Sasha Khapyorsky's patch but adjusted to the refactored "missing target" detection code. It might have been better if the program were called git-url-fetch but it is too late now ;-). Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Sep 16, 2006 at 11:06 UTC
4adffc7b54e8c5d8fc7510007dd9b8235a67430f
1 file changed
+3
-1
http-fetch.c
+3
-1
@@ -149,7 +149,9 @@ static int missing__target(int code, int result)
149
return /* file:// URL -- do we ever use one??? */
150
(result == CURLE_FILE_COULDNT_READ_FILE) ||
151
/* http:// and https:// URL */
152
- (code == 404 && result == CURLE_HTTP_RETURNED_ERROR)
152
+ (code == 404 && result == CURLE_HTTP_RETURNED_ERROR) ||
153
+ /* ftp:// URL */
154
+ (code == 550 && result == CURLE_FTP_COULDNT_RETR_FILE)
155
;
156
}
157