toolbelt icon indicating copy to clipboard operation
toolbelt copied to clipboard

Set SNI to Host header in HostHeaderSSLAdapter

Open qistoph opened this issue 5 years ago • 2 comments

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.

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

qistoph avatar Apr 21 '20 15:04 qistoph

Just noticed another PR (https://github.com/requests/toolbelt/pull/278) mentioning the same issue.

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

qistoph avatar Apr 21 '20 15:04 qistoph

Fixes #159

half-duplex avatar May 25 '22 00:05 half-duplex