const fakeHopHeader …
func init() { … }
func TestReverseProxy(t *testing.T) { … }
func TestReverseProxyStripHeadersPresentInConnection(t *testing.T) { … }
func TestReverseProxyStripEmptyConnection(t *testing.T) { … }
func TestXForwardedFor(t *testing.T) { … }
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 { … }
func TestNilBody(t *testing.T) { … }
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) { … }
func TestReverseProxy_NilBody(t *testing.T) { … }
func TestReverseProxy_AllocatedHeader(t *testing.T) { … }
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) { … }
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) { … }
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) { … }
func TestReverseProxy_PanicBodyError(t *testing.T) { … }
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) { … }