httpie / cli

🥧 HTTPie CLI — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more.
https://httpie.io
BSD 3-Clause "New" or "Revised" License
32.71k stars 3.67k forks source link

Avoid override of headers by urllib3 when unset #1502

Closed abdelq closed 1 year ago

abdelq commented 1 year ago

I attempted to unset User-Agent when using httpie and couldn't understand what was going wrong as -v was showing no User-Agent until I looked at the packets and noticed that urllib3 overwrote it.

Until something like https://github.com/psf/requests/pull/5693 makes it in requests, this deals with the aforementioned issue.

edit: seems like tests are failing because of the unrelated DEFAULT_CIPHERS issue from newer urllib3 versions...

jkbrzt commented 1 year ago

Very nice! Thanks, @abdelq