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

docs: add restricted header info to ClientRequest docs #25075

Merged
merged 2 commits into from Aug 25, 2020

Conversation

VerteDinde
Copy link
Member

Description of Change

Addresses #21148. (cc @nornagon)

Beginning in Electron 7, trying to set a Host header when creating a request with net throws a net::ERR_INVALID_ARGUMENT error. This is due to a Chromium change introduced in 7, where certain header types are now restricted from being set by a consumer.

It doesn't seem like we'll be able to resolve this without patching Chrome directly, but this PR updates our docs to give developers a warning about what headers are restricted/will throw an error if set, and where they can find more information.

Note: I didn't add any release notes since this is a small doc change for something that has been present since 7.0.0, but happy to add a note if it would be helpful!

Checklist

Release Notes

Notes: none

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Aug 21, 2020
@welcome
Copy link

welcome bot commented Aug 21, 2020

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

docs/api/client-request.md Outdated Show resolved Hide resolved
docs/api/client-request.md Show resolved Hide resolved
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Aug 22, 2020
@zcbenz zcbenz merged commit 7704954 into electron:master Aug 25, 2020
@welcome
Copy link

welcome bot commented Aug 25, 2020

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link

release-clerk bot commented Aug 25, 2020

No Release Notes

@VerteDinde VerteDinde deleted the kmh/update-header-docs branch August 25, 2020 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants