1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-09-27 22:36:12 -04:00

detailed error message

This commit is contained in:
Darien Raymond 2017-04-18 00:14:42 +02:00
parent ab9349ec31
commit 35acdb8385
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -252,7 +252,7 @@ func (s *Server) handlePlainHTTP(ctx context.Context, request *http.Request, rea
response.Header.Set("Keep-Alive", "timeout=4")
response.Close = false
} else {
log.Trace(newError("failed to read response").Base(err).AtWarning())
log.Trace(newError("failed to read response from ", request.Host).Base(err).AtWarning())
response = &http.Response{
Status: "Service Unavailable",
StatusCode: 503,
@ -268,7 +268,7 @@ func (s *Server) handlePlainHTTP(ctx context.Context, request *http.Request, rea
response.Header.Set("Proxy-Connection", "close")
}
if err := response.Write(writer); err != nil {
return err
return newError("failed to write response").Base(err)
}
return nil
})