Skip to content

Commit

Permalink
fixup! download: parse http error code for wget too and permit to ret…
Browse files Browse the repository at this point in the history
…rieve it.
  • Loading branch information
rjbou committed Nov 27, 2024
1 parent d166936 commit 8392039
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/repository/opamDownload.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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) ::
Expand All @@ -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;
Expand Down

0 comments on commit 8392039

Please sign in to comment.