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

Set SNI to Host header in HostHeaderSSLAdapter #293

Merged
merged 2 commits into from
Aug 11, 2023

Conversation

qistoph
Copy link
Contributor

@qistoph qistoph commented Apr 21, 2020

Modern TLS/SSL servers can serve content and certificates based on the
Server Name Indication (SNI) that is sent in the Client Hello. By
setting the server_hostname in the connection pool arguments, the
underlying libraries will send the provided hostname as SNI. This allows
us to use the HostHeaderSSLAdapter to request content from a specific IP
address, while still requesting the server to sent content based on a
hostname.

  • All potential contributors must read the Contributor Code of Conduct and follow it
  • Fork the repository on GitHub or GitLab
  • Create a new branch, e.g., git checkout -b bug/12345
  • Fix the bug and add tests (if applicable [1], see How To Add Tests)
  • Run the tests (see How To Run The Tests below)
  • Add documentation (as necessary) for your change
  • Build the documentation to check for errors and formatting (see How To Build The Documentation below)
  • Add yourself to the AUTHORS.rst (unless you’re already there)
  • Commit it. Follow these rules in your commit message:
  • Keep the subject line under 50 characters
  • Use an imperative verb to start the commit
  • Use an empty line between the subject and the message
  • Describe the why in detail in the message portion of the commit
  • Wrap the lines of the message at 72 characters
  • Add the appropriate “Closes #12345” syntax to autoclose the issue it fixed (if it closes an issue)
  • See Example Commit Message below
  • Push it to your fork
  • Create a request for us to merge your contribution

Modern TLS/SSL servers can serve content and certificates based on the
Server Name Indication (SNI) that is sent in the Client Hello. By
setting the server_hostname in the connection pool arguments, the
underlying libraries will send the provided hostname as SNI. This allows
us to use the HostHeaderSSLAdapter to request content from a specific IP
address, while still requesting the server to sent content based on a
hostname.
@qistoph
Copy link
Contributor Author

qistoph commented Apr 21, 2020

Just noticed another PR (#278) mentioning the same issue.

Though I think my contribution is a little more complete (doc update and safety setting on line 43).

@half-duplex
Copy link

Fixes #159

@sigmavirus24 sigmavirus24 merged commit c5ac5f3 into requests:master Aug 11, 2023
1 of 19 checks passed
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.

3 participants