test: add unit test for #1283 (#1288)

This commit is contained in:
Guiheux Steven 2016-12-08 02:59:02 +01:00 committed by Matt Holt
parent e363491a28
commit 8653b70c32

View file

@ -833,6 +833,12 @@ func TestProxyDirectorURL(t *testing.T) {
targetURL: `https://localhost:2021/t/`, targetURL: `https://localhost:2021/t/`,
expectURL: `https://localhost:2021/t/test/`, expectURL: `https://localhost:2021/t/test/`,
}, },
{
requestURL: `http://localhost:2020/test/mypath`,
targetURL: `https://localhost:2021/t/`,
expectURL: `https://localhost:2021/t/mypath`,
without: "/test",
},
} { } {
targetURL, err := url.Parse(c.targetURL) targetURL, err := url.Parse(c.targetURL)
if err != nil { if err != nil {