mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-05-14 00:51:12 +03:00
Add name to errors from v2ray HTTP transports
This commit is contained in:
@@ -146,7 +146,7 @@ func (c *Client) dialHTTP2(ctx context.Context) (net.Conn, error) {
|
||||
conn.Setup(nil, err)
|
||||
} else if response.StatusCode != 200 {
|
||||
response.Body.Close()
|
||||
conn.Setup(nil, E.New("unexpected status: ", response.Status))
|
||||
conn.Setup(nil, E.New("v2ray-http: unexpected status: ", response.Status))
|
||||
} else {
|
||||
conn.Setup(response.Body, nil)
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ func (c *HTTPConn) Read(b []byte) (n int, err error) {
|
||||
return 0, E.Cause(err, "read response")
|
||||
}
|
||||
if response.StatusCode != 200 {
|
||||
return 0, E.New("unexpected status: ", response.Status)
|
||||
return 0, E.New("v2ray-http: unexpected status: ", response.Status)
|
||||
}
|
||||
if cacheLen := reader.Buffered(); cacheLen > 0 {
|
||||
c.responseCache = buf.NewSize(cacheLen)
|
||||
|
||||
Reference in New Issue
Block a user