Issue #5224 - Test to replicate reported issue

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2020-09-02 09:34:16 -05:00
parent e2d0e1fa34
commit e4ca153364
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
1 changed files with 15 additions and 1 deletions

View File

@ -497,7 +497,21 @@ public class ForwardedRequestCustomizerTest
.requestURL("http://fw.example.com:4333/")
.remoteAddr("8.5.4.3").remotePort(2222)
),
Arguments.of(new Request("X-Forwarded-* ( Multiple Ports )")
.headers(
"GET / HTTP/1.1",
"Host: myhost:10001",
"X-Forwarded-For: 127.0.0.1:8888,127.0.0.2:9999",
"X-Forwarded-Port: 10002",
"X-Forwarded-Proto: https",
"X-Forwarded-Host: sub1.example.com:10003",
"X-Forwarded-Server: sub2.example.com"
),
new Expectations()
.scheme("https").serverName("sub1.example.com").serverPort(10002) // Jetty 9.4.18 serverPort is 10003
.requestURL("https://sub.example.com:10002/")
.remoteAddr("127.0.0.1").remotePort(8888)
),
// =================================================================
// Mixed Behavior
Arguments.of(new Request("RFC7239 mixed with X-Forwarded-* headers")