type testMode …
const http1Mode …
const https1Mode …
const http2Mode …
type testNotParallelOpt …
var testNotParallel …
type TBRun …
func run[T TBRun[T]](t T, f func(t T, mode testMode), opts ...any) { … }
type clientServerTest …
func (t *clientServerTest) close() { … }
func (t *clientServerTest) getURL(u string) string { … }
func (t *clientServerTest) scheme() string { … }
var optQuietLog …
func optWithServerLog(lg *log.Logger) func(*httptest.Server) { … }
func newClientServerTest(t testing.TB, mode testMode, h Handler, opts ...any) *clientServerTest { … }
type testLogWriter …
func (w testLogWriter) Write(b []byte) (int, error) { … }
func TestNewClientServerTest(t *testing.T) { … }
func testNewClientServerTest(t *testing.T, mode testMode) { … }
func TestChunkedResponseHeaders(t *testing.T) { … }
func testChunkedResponseHeaders(t *testing.T, mode testMode) { … }
type reqFunc …
type h12Compare …
func (tt h12Compare) reqFunc() reqFunc { … }
func (tt h12Compare) run(t *testing.T) { … }
func mostlyCopy(r *Response) *Response { … }
type slurpResult …
func (sr slurpResult) String() string { … }
func (tt h12Compare) normalizeRes(t *testing.T, res *Response, wantProto string) { … }
func TestH12_HeadContentLengthNoBody(t *testing.T) { … }
func TestH12_HeadContentLengthSmallBody(t *testing.T) { … }
func TestH12_HeadContentLengthLargeBody(t *testing.T) { … }
func TestH12_200NoBody(t *testing.T) { … }
func TestH2_204NoBody(t *testing.T) { … }
func TestH2_304NoBody(t *testing.T) { … }
func TestH2_404NoBody(t *testing.T) { … }
func testH12_noBody(t *testing.T, status int) { … }
func TestH12_SmallBody(t *testing.T) { … }
func TestH12_ExplicitContentLength(t *testing.T) { … }
func TestH12_FlushBeforeBody(t *testing.T) { … }
func TestH12_FlushMidBody(t *testing.T) { … }
func TestH12_Head_ExplicitLen(t *testing.T) { … }
func TestH12_Head_ImplicitLen(t *testing.T) { … }
func TestH12_HandlerWritesTooLittle(t *testing.T) { … }
func TestHandlerWritesTooMuch(t *testing.T) { … }
func testHandlerWritesTooMuch(t *testing.T, mode testMode) { … }
func TestH12_AutoGzip(t *testing.T) { … }
func TestH12_AutoGzip_Disabled(t *testing.T) { … }
func Test304Responses(t *testing.T) { … }
func test304Responses(t *testing.T, mode testMode) { … }
func TestH12_ServerEmptyContentLength(t *testing.T) { … }
func TestH12_RequestContentLength_Known_NonZero(t *testing.T) { … }
func TestH12_RequestContentLength_Known_Zero(t *testing.T) { … }
func TestH12_RequestContentLength_Unknown(t *testing.T) { … }
func h12requestContentLength(t *testing.T, bodyfn func() io.Reader, wantLen int64) { … }
func TestCancelRequestMidBody(t *testing.T) { … }
func testCancelRequestMidBody(t *testing.T, mode testMode) { … }
func TestTrailersClientToServer(t *testing.T) { … }
func testTrailersClientToServer(t *testing.T, mode testMode) { … }
func TestTrailersServerToClient(t *testing.T) { … }
func TestTrailersServerToClientFlush(t *testing.T) { … }
func testTrailersServerToClient(t *testing.T, mode testMode, flush bool) { … }
func TestResponseBodyReadAfterClose(t *testing.T) { … }
func testResponseBodyReadAfterClose(t *testing.T, mode testMode) { … }
func TestConcurrentReadWriteReqBody(t *testing.T) { … }
func testConcurrentReadWriteReqBody(t *testing.T, mode testMode) { … }
func TestConnectRequest(t *testing.T) { … }
func testConnectRequest(t *testing.T, mode testMode) { … }
func TestTransportUserAgent(t *testing.T) { … }
func testTransportUserAgent(t *testing.T, mode testMode) { … }
func TestStarRequestMethod(t *testing.T) { … }
func testStarRequest(t *testing.T, method string, mode testMode) { … }
func TestTransportDiscardsUnneededConns(t *testing.T) { … }
func testTransportDiscardsUnneededConns(t *testing.T, mode testMode) { … }
func TestTransportGCRequest(t *testing.T) { … }
func testTransportGCRequest(t *testing.T, mode testMode, body bool) { … }
func TestTransportRejectsInvalidHeaders(t *testing.T) { … }
func testTransportRejectsInvalidHeaders(t *testing.T, mode testMode) { … }
func TestInterruptWithPanic(t *testing.T) { … }
func testInterruptWithPanic(t *testing.T, mode testMode, panicValue any) { … }
type lockedBytesBuffer …
func (b *lockedBytesBuffer) Write(p []byte) (int, error) { … }
func TestH12_AutoGzipWithDumpResponse(t *testing.T) { … }
func TestCloseIdleConnections(t *testing.T) { … }
func testCloseIdleConnections(t *testing.T, mode testMode) { … }
type noteCloseConn …
func (x noteCloseConn) Close() error { … }
type testErrorReader …
func (r testErrorReader) Read(p []byte) (n int, err error) { … }
func TestNoSniffExpectRequestBody(t *testing.T) { … }
func testNoSniffExpectRequestBody(t *testing.T, mode testMode) { … }
func TestServerUndeclaredTrailers(t *testing.T) { … }
func testServerUndeclaredTrailers(t *testing.T, mode testMode) { … }
func TestBadResponseAfterReadingBody(t *testing.T) { … }
func testBadResponseAfterReadingBody(t *testing.T, mode testMode) { … }
func TestWriteHeader0(t *testing.T) { … }
func testWriteHeader0(t *testing.T, mode testMode) { … }
func TestWriteHeaderNoCodeCheck(t *testing.T) { … }
func TestWriteHeaderNoCodeCheck_h1hijack(t *testing.T) { … }
func testWriteHeaderAfterWrite(t *testing.T, mode testMode, hijack bool) { … }
func TestBidiStreamReverseProxy(t *testing.T) { … }
func testBidiStreamReverseProxy(t *testing.T, mode testMode) { … }
func TestH12_WebSocketUpgrade(t *testing.T) { … }
func TestIdentityTransferEncoding(t *testing.T) { … }
func testIdentityTransferEncoding(t *testing.T, mode testMode) { … }
func TestEarlyHintsRequest(t *testing.T) { … }
func testEarlyHintsRequest(t *testing.T, mode testMode) { … }