mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 16:29:56 +00:00
TUN-3505: Response body for status code origin returns EOF on Read
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -252,8 +253,9 @@ func (o *statusCode) RoundTrip(_ *http.Request) (*http.Response, error) {
|
||||
|
||||
type NopReadCloser struct{}
|
||||
|
||||
// Read always returns EOF to signal end of input
|
||||
func (nrc *NopReadCloser) Read(buf []byte) (int, error) {
|
||||
return 0, nil
|
||||
return 0, io.EOF
|
||||
}
|
||||
|
||||
func (nrc *NopReadCloser) Close() error {
|
||||
|
Reference in New Issue
Block a user