diff --git a/lib/webrick/httprequest.rb b/lib/webrick/httprequest.rb index 2b9f3f2f47..a25c9933c5 100644 --- a/lib/webrick/httprequest.rb +++ b/lib/webrick/httprequest.rb @@ -185,7 +185,7 @@ module WEBrick meta["REQUEST_URI"] = @request_uri.to_s meta["SCRIPT_NAME"] = @script_name.dup meta["SERVER_NAME"] = @host - meta["SERVER_PORT"] = @port + meta["SERVER_PORT"] = @port.to_s meta["SERVER_PROTOCOL"] = "HTTP/" + @config[:HTTPVersion].to_s meta["SERVER_SOFTWARE"] = @config[:ServerSoftware].dup