1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Fix rack handler logic (#1290)

There was a mistake previously where if both host and port were passed in as "default" they would take precedence of any values from the puma config "file". 

We can fix this by checking to make sure there were values explicitly passed before setting the config.
This commit is contained in:
Richard Schneeman 2017-05-12 15:28:59 -05:00 committed by Nate Berkopec
parent 9d93a0f62f
commit f0767b0e1f

View file

@ -42,10 +42,12 @@ module Rack
user_config.threads min, max
end
if options[:Host] || options[:Port]
host = options[:Host] || default_options[:Host]
port = options[:Port] || default_options[:Port]
self.set_host_port_to_config(host, port, user_config)
end
self.set_host_port_to_config(default_options[:Host], default_options[:Port], default_config)
user_config.app app