mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Treat path-like hosts as unix sockets. Fixes #824
This commit is contained in:
parent
61294479b2
commit
90e6e3e011
1 changed files with 9 additions and 3 deletions
|
@ -28,10 +28,16 @@ module Rack
|
|||
c.threads min, max
|
||||
end
|
||||
|
||||
host = options[:Host] || ::Puma::Configuration::DefaultTCPHost
|
||||
port = options[:Port] || ::Puma::Configuration::DefaultTCPPort
|
||||
host = options[:Host]
|
||||
|
||||
c.port port, host
|
||||
if host && (host[0,1] == '.' || host[0,1] == '/')
|
||||
c.bind "unix://#{host}"
|
||||
else
|
||||
host ||= ::Puma::Configuration::DefaultTCPHost
|
||||
port = options[:Port] || ::Puma::Configuration::DefaultTCPPort
|
||||
|
||||
c.port port, host
|
||||
end
|
||||
|
||||
c.app app
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue