From 8392039a166fbbb6dde46f0422570a2b81d3f9ee Mon Sep 17 00:00:00 2001 From: Raja Boujbel Date: Wed, 27 Nov 2024 18:33:48 +0100 Subject: [PATCH] fixup! download: parse http error code for wget too and permit to retrieve it. --- src/repository/opamDownload.ml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/repository/opamDownload.ml b/src/repository/opamDownload.ml index 7f948d094b5..890bc5971b3 100644 --- a/src/repository/opamDownload.ml +++ b/src/repository/opamDownload.ml @@ -37,6 +37,7 @@ let curl_args = (* --fail is as old as curl; though the assumption that it leads to exit code 22 when there's an error is probably 5.3 21-Dec-1998 (prior to that it led to exit code 21) *) + (CString "--show-headers", None) :: (CString "--fail", None) :: main_args else (CString "--write-out", None) :: @@ -53,6 +54,7 @@ let wget_args = [ CString "--header=Accept: */*", None; CString "-t", None; CIdent "retry", None; CString "-O", None; CIdent "out", None; + CString "--server-response", None; (* Get the HTTP responde to parse error code *) CString "-U", None; user_agent, None; CString "--", None; (* End list of options *) CIdent "url", None;