Skip to content

fix: allow unsetting Accept-Encoding - #1861

Open
krzysdz wants to merge 1 commit into
forwardemail:masterfrom
krzysdz:allow-unsetting-accept-encoding
Open

krzysdz wants to merge 1 commit into
forwardemail:masterfrom
krzysdz:allow-unsetting-accept-encoding

Conversation

@krzysdz

@krzysdz krzysdz commented Oct 7, 2026 •

Copy link
Copy Markdown

This PR is based on #1560, with the following changes:

Warning

The new tests run only on Node.js, because only the Node.js code sets the default Accept-Encoding. The tests do not prevent a regression like #1573, because .unset() tests can be found only in test/node/.

Closes #1860

Checklist

  • I have ensured my pull request is not behind the main or master branch of the original repository.
  • I have rebased all commits where necessary so that reviewing this pull request can be done without having to merge it first.
  • I have written a commit message that passes commitlint linting.
  • I have ensured that my code changes pass linting tests.
    None of the lint warnings are from my code.
  • I have ensured that my code changes pass unit tests.
  • I have described my pull request and the reasons for code changes along with context if necessary.

Footnotes

  1. Except that request.post('/sth').send({ name: 'tj' }).unset('Content-Type').end() will fail, because the data cannot be serialised as serialisation function is chosen in ._end() based on the Content-Type. This probably should be another issue. ↩

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] Cannot unset Accept-Encoding

1 participant