mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 17:46:58 -05:00
read content of the http response
This commit is contained in:
parent
43dfb8ced3
commit
fb3d2ca862
@ -7,6 +7,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"io/ioutil"
|
||||||
|
|
||||||
xproxy "golang.org/x/net/proxy"
|
xproxy "golang.org/x/net/proxy"
|
||||||
"v2ray.com/core"
|
"v2ray.com/core"
|
||||||
"v2ray.com/core/app/log"
|
"v2ray.com/core/app/log"
|
||||||
@ -738,6 +740,8 @@ func TestDomainSniffing(t *testing.T) {
|
|||||||
resp, err := client.Get("https://www.github.com/")
|
resp, err := client.Get("https://www.github.com/")
|
||||||
assert.Error(err).IsNil()
|
assert.Error(err).IsNil()
|
||||||
assert.Int(resp.StatusCode).Equals(200)
|
assert.Int(resp.StatusCode).Equals(200)
|
||||||
|
|
||||||
|
assert.Error(resp.Write(ioutil.Discard)).IsNil()
|
||||||
}
|
}
|
||||||
|
|
||||||
CloseAllServers()
|
CloseAllServers()
|
||||||
|
Loading…
Reference in New Issue
Block a user