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

Add an sni_hostname request extension. #691

Closed
tomchristie opened this issue May 18, 2023 · 0 comments · Fixed by #696
Closed

Add an sni_hostname request extension. #691

tomchristie opened this issue May 18, 2023 · 0 comments · Fixed by #696
Labels
enhancement New feature or request

Comments

@tomchristie
Copy link
Member

Add a request extension called "sni_hostname", which may be used to control the hostname used when initiating an SSL connection.

This would be an optional override, instead of using the hostname from the URL...

kwargs = {
"ssl_context": ssl_context,
"server_hostname": self._origin.host.decode("ascii"),
"timeout": timeout,
}
async with Trace("connection.start_tls", request, kwargs) as trace:
stream = await stream.start_tls(**kwargs)
trace.return_value = stream

Refs: encode/httpx#2592 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant