go/src/net/http/httputil/reverseproxy_test.go

const fakeHopHeader

func init() {}

func TestReverseProxy(t *testing.T) {}

// Issue 16875: remove any proxied headers mentioned in the "Connection"
// header value.
func TestReverseProxyStripHeadersPresentInConnection(t *testing.T) {}

func TestReverseProxyStripEmptyConnection(t *testing.T) {}

func TestXForwardedFor(t *testing.T) {}

// Issue 38079: don't append to X-Forwarded-For if it's present but nil
func TestXForwardedFor_Omit(t *testing.T) {}

func TestReverseProxyRewriteStripsForwarded(t *testing.T) {}

var proxyQueryTests

func TestReverseProxyQuery(t *testing.T) {}

func TestReverseProxyFlushInterval(t *testing.T) {}

type mockFlusher

func (m *mockFlusher) Flush() {}

type wrappedRW

func (w *wrappedRW) Unwrap() http.ResponseWriter {}

func TestReverseProxyResponseControllerFlushInterval(t *testing.T) {}

func TestReverseProxyFlushIntervalHeaders(t *testing.T) {}

func TestReverseProxyCancellation(t *testing.T) {}

func req(t *testing.T, v string) *http.Request {}

// Issue 12344
func TestNilBody(t *testing.T) {}

// Issue 15524
func TestUserAgentHeader(t *testing.T) {}

type bufferPool

func (bp bufferPool) Get() []byte  {}

func (bp bufferPool) Put(v []byte) {}

func TestReverseProxyGetPutBuffer(t *testing.T) {}

func TestReverseProxy_Post(t *testing.T) {}

type RoundTripperFunc

func (fn RoundTripperFunc) RoundTrip(req *http.Request) (*http.Response, error) {}

// Issue 16036: send a Request with a nil Body when possible
func TestReverseProxy_NilBody(t *testing.T) {}

// Issue 33142: always allocate the request headers
func TestReverseProxy_AllocatedHeader(t *testing.T) {}

// Issue 14237. Test ModifyResponse and that an error from it
// causes the proxy to return StatusBadGateway, or StatusOK otherwise.
func TestReverseProxyModifyResponse(t *testing.T) {}

type failingRoundTripper

func (failingRoundTripper) RoundTrip(*http.Request) (*http.Response, error) {}

type staticResponseRoundTripper

func (rt staticResponseRoundTripper) RoundTrip(*http.Request) (*http.Response, error) {}

func TestReverseProxyErrorHandler(t *testing.T) {}

// Issue 16659: log errors from short read
func TestReverseProxy_CopyBuffer(t *testing.T) {}

type staticTransport

func (t *staticTransport) RoundTrip(r *http.Request) (*http.Response, error) {}

func BenchmarkServeHTTP(b *testing.B) {}

func TestServeHTTPDeepCopy(t *testing.T) {}

// Issue 18327: verify we always do a deep copy of the Request.Header map
// before any mutations.
func TestClonesRequestHeaders(t *testing.T) {}

type roundTripperFunc

func (fn roundTripperFunc) RoundTrip(req *http.Request) (*http.Response, error) {}

func TestModifyResponseClosesBody(t *testing.T) {}

type checkCloser

func (cc *checkCloser) Close() error {}

func (cc *checkCloser) Read(b []byte) (int, error) {}

// Issue 23643: panic on body copy error
func TestReverseProxy_PanicBodyError(t *testing.T) {}

// Issue #46866: panic without closing incoming request body causes a panic
func TestReverseProxy_PanicClosesIncomingBody(t *testing.T) {}

func TestSelectFlushInterval(t *testing.T) {}

func TestReverseProxyWebSocket(t *testing.T) {}

func TestReverseProxyWebSocketCancellation(t *testing.T) {}

func TestUnannouncedTrailer(t *testing.T) {}

func TestSetURL(t *testing.T) {}

func TestSingleJoinSlash(t *testing.T) {}

func TestJoinURLPath(t *testing.T) {}

func TestReverseProxyRewriteReplacesOut(t *testing.T) {}

func Test1xxHeadersNotModifiedAfterRoundTrip(t *testing.T) {}

func Test1xxResponses(t *testing.T) {}

const testWantsCleanQuery

const testWantsRawQuery

func TestReverseProxyQueryParameterSmugglingDirectorDoesNotParseForm(t *testing.T) {}

func TestReverseProxyQueryParameterSmugglingDirectorParsesForm(t *testing.T) {}

func TestReverseProxyQueryParameterSmugglingRewrite(t *testing.T) {}

func TestReverseProxyQueryParameterSmugglingRewritePreservesRawQuery(t *testing.T) {}

func testReverseProxyQueryParameterSmuggling(t *testing.T, wantCleanQuery bool, newProxy func(*url.URL) *ReverseProxy) {}

type testResponseWriter

func (rw *testResponseWriter) Header() http.Header {}

func (rw *testResponseWriter) WriteHeader(statusCode int) {}

func (rw *testResponseWriter) Write(p []byte) (int, error) {}