Permalink
Browse files

Merge pull request #698 from noxqsgit/master

please ignore defined but empty ENV['PORT']
  • Loading branch information...
rkh committed Mar 25, 2013
2 parents 96da46c + 824fe5c commit 49edbc240691e2237498df791a105f8b46f6e99b
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sinatra/base.rb
View
@@ -1795,7 +1795,7 @@ class << self
set :running, false # is the built-in server running now?
set :server, %w[HTTP webrick]
set :bind, Proc.new { development? ? 'localhost' : '0.0.0.0' }
- set :port, Integer(ENV['PORT'] || 4567)
+ set :port, Integer(ENV['PORT'] && !ENV['PORT'].empty? ? ENV['PORT'] : 4567)
ruby_engine = defined?(RUBY_ENGINE) && RUBY_ENGINE

0 comments on commit 49edbc2

Please sign in to comment.