aboutsummaryrefslogtreecommitdiffstats
path: root/test/webrick
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-21 10:32:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-06-21 10:32:26 +0000
commitdee1771b64a1b772b54b9cb273bf1a07cb3e7f1f (patch)
treef9a17382df572796d7424ff718a1f4a6eb73193d /test/webrick
parent72c8eeb6ae01c91e258f291e53036f6d6e921629 (diff)
downloadruby-dee1771b64a1b772b54b9cb273bf1a07cb3e7f1f.tar.gz
Multiple values X-Forwarded-Proto in webrick
* lib/webrick/httprequest.rb (setup_forwarded_info): Use the first value in X-Forwarded-Proto, if header contains multiple comma separated values. Some middlewares may add these values to the list, not replacing. [Fix GH-1386] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/webrick')
-rw-r--r--test/webrick/test_httprequest.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/webrick/test_httprequest.rb b/test/webrick/test_httprequest.rb
index 3ece8a3ad9..855ff9d4a7 100644
--- a/test/webrick/test_httprequest.rb
+++ b/test/webrick/test_httprequest.rb
@@ -301,7 +301,7 @@ GET /
GET /foo HTTP/1.1
Host: localhost:10080
Client-IP: 234.234.234.234
- X-Forwarded-Proto: https
+ X-Forwarded-Proto: https, http
X-Forwarded-For: 192.168.1.10, 10.0.0.1, 123.123.123.123
X-Forwarded-Host: forward.example.com
X-Forwarded-Server: server.example.com