Skip to content

Commit

Permalink
Fix things caught by go vet.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartle-stripe committed Mar 9, 2020
1 parent 29f9e0b commit 331dc0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions https.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ func TLSConfigFromCA(ca *tls.Certificate) func(host string, ctx *ProxyCtx) (*tls
var cert *tls.Certificate

hostname := stripPort(host)
config := *defaultTLSConfig
config := defaultTLSConfig.Clone()
ctx.Logf("signing for %s", stripPort(host))

genCert := func() (*tls.Certificate, error) {
Expand All @@ -443,6 +443,6 @@ func TLSConfigFromCA(ca *tls.Certificate) func(host string, ctx *ProxyCtx) (*tls
}

config.Certificates = append(config.Certificates, *cert)
return &config, nil
return config, nil
}
}
5 changes: 2 additions & 3 deletions proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,7 @@ func constantHttpServer(content []byte) (addr string) {

func TestIcyResponse(t *testing.T) {
// TODO: fix this test
return // skip for now
s := constantHttpServer([]byte("ICY 200 OK\r\n\r\nblablabla"))
/*s := constantHttpServer([]byte("ICY 200 OK\r\n\r\nblablabla"))
proxy := goproxy.NewProxyHttpServer()
proxy.Verbose = true
_, l := oneShotProxy(proxy, t)
Expand All @@ -525,7 +524,7 @@ func TestIcyResponse(t *testing.T) {
panicOnErr(err, "readAll")
if string(raw) != "ICY 200 OK\r\n\r\nblablabla" {
t.Error("Proxy did not send the malformed response received")
}
}*/
}

type VerifyNoProxyHeaders struct {
Expand Down

0 comments on commit 331dc0c

Please sign in to comment.