Issue #15215 has been updated by aspettl (Aaron Spettl).


I still like to have this feature. Any opinion on this? Especially @naruse as a maintainer of lib/net/http(s).rb?

Thanks!

----------------------------------------
Feature #15215: HTTPS server name indication (SNI): explicit server_name in Net::HTTP
https://bugs.ruby-lang.org/issues/15215#change-75725

* Author: aspettl (Aaron Spettl)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
**Current behavior and problem:**
At the moment, the host name or IP address given in the URL is used to provide the server name for SNI in HTTPS connections. While this behavior is sufficient in most cases, establishing a connection to a fixed IP using a certain server name is not possible.

**Proposed solution:**
Decouple the server name used for SNI from the address used for connecting. Add a new ssl_server_name attribute in Net::HTTP that defaults to the address (so the default behavior stays exactly the same).

**Notes**
* There are scenarios where a client would like to select a specific host when e.g. DNS round robin is configured. Examples: fallback strategies, monitoring of individual hosts.
* This has nothing to do with the HTTP "Host" header, which one needs to set additionally.

For my "proposed solution", a patch is attached (or see https://github.com/ruby/ruby/pull/1977).
Please let me know about any ideas for improvement or other approaches, thanks!

---Files--------------------------------
ssl_server_name.patch (2.17 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>