Cannot set custom accept header on wget requests
Package Information
- Package name: busybox
- Package version: v1.36.1 (2024-05-21 13:38:37 UTC) multi-call binary.
- Alpine version: 3.20.0
- Alpine architecture: x86_64
Summary
Adding --header 'accept: application/json'
results in the header being discarded.
This looks to be related to busybox wget https://www.netfilter.org fails (#15861 - closed)
which sets the header to accept: */*
always. I noticed this when it broke a CI/CD
pipeline that depended on an endpoint that returned specific content when it used
accept: application/json
. It doesn't occur on Alpine 3.19 and only occurs on Alpine 3.20
as of late.
Steps to reproduce
-
docker run --pull always --rm -it alpine:3.20
sh wget --header 'accept: application/json' https://github.com/nushell/nushell/releases/latest
- Notice that the response is returned in HTML instead of JSON.
Edited by Oscar Alberto Tovar