Skip to content

Commit

Permalink
Allow SERVER_PORT to be a string containing a port number.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Feb 7, 2020
1 parent eb7de84 commit eec2635
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/rack/lint.rb
Expand Up @@ -279,10 +279,10 @@ def check_env(env)
assert("env missing required key #{header}") { env.include? header }
}

## The <tt>SERVER_PORT</tt> must be an integer if set.
assert("env[SERVER_PORT] is not an integer") do
## The <tt>SERVER_PORT</tt> must be an Integer if set.
assert("env[SERVER_PORT] is not an Integer") do
server_port = env["SERVER_PORT"]
server_port.nil? || server_port.is_a?(Integer)
server_port.nil? || (Integer(server_port) rescue false)
end

## The <tt>SERVER_NAME</tt> must be a valid authority as defined by RFC7540.
Expand Down

0 comments on commit eec2635

Please sign in to comment.