lib/httpx/connection.rb in httpx-1.2.4 vs lib/httpx/connection.rb in httpx-1.2.6
- old
+ new
@@ -46,14 +46,14 @@
attr_writer :timers
attr_accessor :family
def initialize(uri, options)
- @origins = [uri.origin]
- @origin = Utils.to_uri(uri.origin)
@options = Options.new(options)
@type = initialize_type(uri, @options)
+ @origins = [uri.origin]
+ @origin = Utils.to_uri(uri.origin)
@window_size = @options.window_size
@read_buffer = Buffer.new(@options.buffer_size)
@write_buffer = Buffer.new(@options.buffer_size)
@pending = []
on(:error, &method(:on_error))
@@ -624,10 +624,14 @@
sock.ssl_session = sess
end
end
when "unix"
- UNIX.new(@origin, addrs, @options)
+ path = Array(addrs).first
+
+ path = String(path) if path
+
+ UNIX.new(@origin, path, @options)
else
raise Error, "unsupported transport (#{@type})"
end
end