Issue #13719 has been updated by hadmut (Hadmut Danisch).


Any news on this?

I was just trying to use the rest-client gem to connect to a unix domain socket, which isn't possible since the underlying net/http component does not accept unix domain URLs. 

Since offering rest-apis on unix-domain sockets has become a standard, ruby should be able to connect straight forward. 

----------------------------------------
Feature #13719: [PATCH] net/http: allow existing socket arg for Net::HTTP.start
https://bugs.ruby-lang.org/issues/13719#change-87531

* Author: normalperson (Eric Wong)
* Status: Open
* Priority: Normal
----------------------------------------
~~~
This allows Net::HTTP users to use Unix domain sockets
or any other type of stream socket, including TCP.
Several HTTP servers (e.g. nginx and puma) support
listening on local Unix sockets instead of TCP.

* lib/net/http.rb (HTTP.start): handle :socket option
  (initialize): @live_socket defaults to nil
  (connect): only connect if @live_socket is missing
  (do_finish): remove reference to @live_socket
* test/net/http/test_http.rb (test_socket_arg_unix): new test

~~~
patch mirror:
https://80x24.org/spew/20170705112439.22359-1-e / 80x24.org/raw


---Files--------------------------------
0001-net-http-allow-existing-socket-arg-for-Net-HTTP.star.patch (4.72 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>