diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-04-24 15:00:40 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-04-24 15:00:40 -0700 |
commit | a1c61a663dbeda29967614ead7cac018281ed9de (patch) | |
tree | 68ce50e723d04665d546ef2f4e2cb4342026725a /lib/unicorn/configurator.rb | |
parent | ffe6208286b282db2b2e35ae811c9bd014098fe0 (diff) | |
download | unicorn-a1c61a663dbeda29967614ead7cac018281ed9de.tar.gz |
The following specifications to bind port 8080 on all interfaces are now accepted in the configuration file: listen "8080" # (with quotes) listen 8080 # (without quotes)
Diffstat (limited to 'lib/unicorn/configurator.rb')
-rw-r--r-- | lib/unicorn/configurator.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb index bd06996..6f49905 100644 --- a/lib/unicorn/configurator.rb +++ b/lib/unicorn/configurator.rb @@ -297,6 +297,7 @@ module Unicorn # expands pathnames of sockets if relative to "~" or "~username" # expands "*:port and ":port" to "0.0.0.0:port" def expand_addr(address) #:nodoc + return "0.0.0.0:#{address}" if Integer === address return address unless String === address case address @@ -304,7 +305,7 @@ module Unicorn File.expand_path($1) when %r{\A~} File.expand_path(address) - when %r{\A\*:(\d+)\z} + when %r{\A(?:\*:)?(\d+)\z} "0.0.0.0:#$1" when %r{\A(.*):(\d+)\z} # canonicalize the name |