Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the SWH fallback feature when using wget2 #6303

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ users)
## Shell

## Internal
* Fix the SWH fallback feature when using wget2 [#6303 @kit-ty-kate]

## Internal: Windows

Expand Down
7 changes: 7 additions & 0 deletions src/repository/opamDownload.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ let curl_args =
main_args

let wget_args = [
(* wget2 by default has
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
which makes some servers return an html page instead of the expected
content. This is the case for the Software Heritage REST API.
Using Accept: */* makes it on par with curl
*)
CString "--header=Accept: */*", None;
CString "-t", None; CIdent "retry", None;
CString "-O", None; CIdent "out", None;
CString "-U", None; user_agent, None;
Expand Down
Loading