mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 18:39:58 +00:00
TUN-1981: Write response header & body on proxy error to notify eyeballs of failure category
This commit is contained in:

committed by
Chung Ting Huang

parent
e255a7da26
commit
4090049fff
@@ -23,8 +23,8 @@ func IsLBProbeRequest(req *http.Request) bool {
|
||||
return strings.HasPrefix(req.UserAgent(), lbProbeUserAgentPrefix)
|
||||
}
|
||||
|
||||
func CreateRequest(stream *h2mux.MuxedStream, originAddr string) (*http.Request, error) {
|
||||
req, err := http.NewRequest(http.MethodGet, originAddr, h2mux.MuxedStreamReader{MuxedStream: stream})
|
||||
func createRequest(stream *h2mux.MuxedStream, url string) (*http.Request, error) {
|
||||
req, err := http.NewRequest(http.MethodGet, url, h2mux.MuxedStreamReader{MuxedStream: stream})
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "unexpected error from http.NewRequest")
|
||||
}
|
||||
|
Reference in New Issue
Block a user