Avoid issues when using wget2 where the requested url might return an html page instead of the expected content#6303
Conversation
fc10a36 to
06e01cb
Compare
|
As we will drop the support of wget in for SWH fallback, is the PR still needed? I can integrate it in the new PR that i'll that contains the support of wget for SWH fallback. |
it is still needed for the rare cases where servers serving package archives would have the same behaviour (serving html in priority to the expected archive) |
The PR title, changes and commit should be changed then to highlight that part, no SWH related. If it is possible, can you share some before/after outputs? |
you mean something like that? |
283a668 to
1db4aa8
Compare
… html page instead of the expected content
When using wget2 (default wget on Fedora 40 and 41), the testsuite fails with:
It turns out the issue was that by default wget2 prefers to get html files so the Software Heritage server will serve an html file instead of the expected
application/json. This fix fixes this issue as well when downloading archives from some servers that also have the same behaviour of returning a different output depending on the value ofAccept:.See rockdaboot/wget2#337