1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-15 00:15:00 +02:00

fix upstream request path

This commit is contained in:
Jehiah Czebotar
2015-03-21 15:29:07 -04:00
parent 736ec2aa9f
commit 16f2c981f3
2 changed files with 6 additions and 6 deletions

View File

@ -51,14 +51,13 @@ func TestEncodedSlashes(t *testing.T) {
defer frontend.Close()
f, _ := url.Parse(frontend.URL)
encodedPath := "/a%2Fb/"
encodedPath := "/a%2Fb/?c=1"
getReq := &http.Request{URL: &url.URL{Scheme: "http", Host: f.Host, Opaque: encodedPath}}
_, err := http.DefaultClient.Do(getReq)
if err != nil {
t.Fatalf("err %s", err)
}
expected := backend.URL + encodedPath
if seen != expected {
t.Errorf("got bad request %q expected %q", seen, expected)
if seen != encodedPath {
t.Errorf("got bad request %q expected %q", seen, encodedPath)
}
}