Allow specifying scheme when proxying

This commit is contained in:
Jordan Liggitt
2015-10-02 02:45:32 -04:00
parent 3902f76512
commit b9ba3bd7c2
11 changed files with 235 additions and 70 deletions

View File

@@ -388,7 +388,7 @@ func TestDefaultProxyTransport(t *testing.T) {
h := UpgradeAwareProxyHandler{
Location: locURL,
}
result := h.defaultProxyTransport(URL)
result := h.defaultProxyTransport(URL, nil)
transport := result.(*corsRemovingTransport).RoundTripper.(*proxy.Transport)
if transport.Scheme != test.expectedScheme {
t.Errorf("%s: unexpected scheme. Actual: %s, Expected: %s", test.name, transport.Scheme, test.expectedScheme)