go/src/net/http/request_test.go

func TestQuery(t *testing.T) {}

// Issue #25192: Test that ParseForm fails but still parses the form when a URL
// containing a semicolon is provided.
func TestParseFormSemicolonSeparator(t *testing.T) {}

func TestParseFormQuery(t *testing.T) {}

// Tests that we only parse the form automatically for certain methods.
func TestParseFormQueryMethods(t *testing.T) {}

func TestParseFormUnknownContentType(t *testing.T) {}

func TestParseFormInitializeOnError(t *testing.T) {}

func TestMultipartReader(t *testing.T) {}

// Issue 9305: ParseMultipartForm should populate PostForm too
func TestParseMultipartFormPopulatesPostForm(t *testing.T) {}

func TestParseMultipartForm(t *testing.T) {}

// Issue 45789: multipart form should not include directory path in filename
func TestParseMultipartFormFilename(t *testing.T) {}

// Issue #40430: Test that if maxMemory for ParseMultipartForm when combined with
// the payload size and the internal leeway buffer size of 10MiB overflows, that we
// correctly return an error.
func TestMaxInt64ForMultipartFormMaxMemoryOverflow(t *testing.T) {}

func testMaxInt64ForMultipartFormMaxMemoryOverflow(t *testing.T, mode testMode) {}

func TestRequestRedirect(t *testing.T) {}

func testRequestRedirect(t *testing.T, mode testMode) {}

func TestSetBasicAuth(t *testing.T) {}

func TestMultipartRequest(t *testing.T) {}

// Issue #25192: Test that ParseMultipartForm fails but still parses the
// multi-part form when a URL containing a semicolon is provided.
func TestParseMultipartFormSemicolonSeparator(t *testing.T) {}

func TestMultipartRequestAuto(t *testing.T) {}

func TestMissingFileMultipartRequest(t *testing.T) {}

// Test that FormValue invokes ParseMultipartForm.
func TestFormValueCallsParseMultipartForm(t *testing.T) {}

// Test that FormFile invokes ParseMultipartForm.
func TestFormFileCallsParseMultipartForm(t *testing.T) {}

// Test that ParseMultipartForm errors if called
// after MultipartReader on the same request.
func TestParseMultipartFormOrder(t *testing.T) {}

// Test that MultipartReader errors if called
// after ParseMultipartForm on the same request.
func TestMultipartReaderOrder(t *testing.T) {}

// Test that FormFile errors if called after
// MultipartReader on the same request.
func TestFormFileOrder(t *testing.T) {}

var readRequestErrorTests

func TestReadRequestErrors(t *testing.T) {}

var newRequestHostTests

func TestNewRequestHost(t *testing.T) {}

func TestRequestInvalidMethod(t *testing.T) {}

func TestNewRequestContentLength(t *testing.T) {}

var parseHTTPVersionTests

func TestParseHTTPVersion(t *testing.T) {}

type getBasicAuthTest

type basicAuthCredentialsTest

var getBasicAuthTests

func TestGetBasicAuth(t *testing.T) {}

var parseBasicAuthTests

func TestParseBasicAuth(t *testing.T) {}

type logWrites

func (l logWrites) WriteByte(c byte) error {}

func (l logWrites) Write(p []byte) (n int, err error) {}

func TestRequestWriteBufferedWriter(t *testing.T) {}

func TestRequestBadHostHeader(t *testing.T) {}

func TestRequestBadUserAgent(t *testing.T) {}

func TestStarRequest(t *testing.T) {}

type responseWriterJustWriter

func (responseWriterJustWriter) Header() Header  {}

func (responseWriterJustWriter) WriteHeader(int) {}

type delayedEOFReader

func (dr delayedEOFReader) Read(p []byte) (n int, err error) {}

func TestIssue10884_MaxBytesEOF(t *testing.T) {}

// Issue 14981: MaxBytesReader's return error wasn't sticky. It
// doesn't technically need to be, but people expected it to be.
func TestMaxBytesReaderStickyError(t *testing.T) {}

// Issue 45101: maxBytesReader's Read panicked when n < -1. This test
// also ensures that Read treats negative limits as equivalent to 0.
func TestMaxBytesReaderDifferentLimits(t *testing.T) {}

func TestWithContextNilURL(t *testing.T) {}

// Ensure that Request.Clone creates a deep copy of TransferEncoding.
// See issue 41907.
func TestRequestCloneTransferEncoding(t *testing.T) {}

// Ensure that Request.Clone works correctly with PathValue.
// See issue 64911.
func TestRequestClonePathValue(t *testing.T) {}

// Issue 34878: verify we don't panic when including basic auth (Go 1.13 regression)
func TestNoPanicOnRoundTripWithBasicAuth(t *testing.T) {}

func testNoPanicWithBasicAuth(t *testing.T, mode testMode) {}

// verify that NewRequest sets Request.GetBody and that it works
func TestNewRequestGetBody(t *testing.T) {}

func testMissingFile(t *testing.T, req *Request) {}

func newTestMultipartRequest(t *testing.T) *Request {}

func validateTestMultipartContents(t *testing.T, req *Request, allMem bool) {}

func testMultipartFile(t *testing.T, req *Request, key, expectFilename, expectContent string) multipart.File {}

// Issue 53181: verify Request.Cookie return the correct Cookie.
// Return ErrNoCookie instead of the first cookie when name is "".
func TestRequestCookie(t *testing.T) {}

func TestRequestCookiesByName(t *testing.T) {}

const fileaContents

const filebContents

const textaValue

const textbValue

const boundary

const message

func benchmarkReadRequest(b *testing.B, request string) {}

type infiniteReader

func (r *infiniteReader) Read(b []byte) (int, error) {}

func BenchmarkReadRequestChrome(b *testing.B) {}

func BenchmarkReadRequestCurl(b *testing.B) {}

func BenchmarkReadRequestApachebench(b *testing.B) {}

func BenchmarkReadRequestSiege(b *testing.B) {}

func BenchmarkReadRequestWrk(b *testing.B) {}

func BenchmarkFileAndServer_1KB(b *testing.B) {}

func BenchmarkFileAndServer_16MB(b *testing.B) {}

func BenchmarkFileAndServer_64MB(b *testing.B) {}

func benchmarkFileAndServer(b *testing.B, n int64) {}

func runFileAndServerBenchmarks(b *testing.B, mode testMode, f *os.File, n int64) {}

func TestErrNotSupported(t *testing.T) {}

func TestPathValueNoMatch(t *testing.T) {}

func TestPathValueAndPattern(t *testing.T) {}

func TestSetPathValue(t *testing.T) {}

func TestStatus(t *testing.T) {}