From 8653b70c32f9a79f165d9417f4c6c45eebbc6dd1 Mon Sep 17 00:00:00 2001 From: Guiheux Steven Date: Thu, 8 Dec 2016 02:59:02 +0100 Subject: [PATCH] test: add unit test for #1283 (#1288) --- caddyhttp/proxy/proxy_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/caddyhttp/proxy/proxy_test.go b/caddyhttp/proxy/proxy_test.go index 40c291c4..d8c1b0cf 100644 --- a/caddyhttp/proxy/proxy_test.go +++ b/caddyhttp/proxy/proxy_test.go @@ -833,6 +833,12 @@ func TestProxyDirectorURL(t *testing.T) { targetURL: `https://localhost:2021/t/`, 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) if err != nil {