go/src/mime/multipart/formdata_test.go

func TestReadForm(t *testing.T) {}

func TestReadFormWithNamelessFile(t *testing.T) {}

// Issue 58384: Handle ReadForm(math.MaxInt64)
func TestReadFormWitFileNameMaxMemoryOverflow(t *testing.T) {}

// Issue 40430: Handle ReadForm(math.MaxInt64)
func TestReadFormMaxMemoryOverflow(t *testing.T) {}

func TestReadFormWithTextContentType(t *testing.T) {}

func testFile(t *testing.T, fh *FileHeader, efn, econtent string) File {}

const fileaContents

const filebContents

const textaValue

const textbValue

const boundary

const messageWithFileWithoutName

const messageWithFileName

const messageWithTextContentType

const message

func TestReadForm_NoReadAfterEOF(t *testing.T) {}

type failOnReadAfterErrorReader

func (r *failOnReadAfterErrorReader) Read(p []byte) (n int, err error) {}

// TestReadForm_NonFileMaxMemory asserts that the ReadForm maxMemory limit is applied
// while processing non-file form data as well as file form data.
func TestReadForm_NonFileMaxMemory(t *testing.T) {}

// TestReadForm_MetadataTooLarge verifies that we account for the size of field names,
// MIME headers, and map entry overhead while limiting the memory consumption of parsed forms.
func TestReadForm_MetadataTooLarge(t *testing.T) {}

// TestReadForm_ManyFiles_Combined tests that a multipart form containing many files only
// results in a single on-disk file.
func TestReadForm_ManyFiles_Combined(t *testing.T) {}

// TestReadForm_ManyFiles_Distinct tests that setting GODEBUG=multipartfiles=distinct
// results in every file in a multipart form being placed in a distinct on-disk file.
func TestReadForm_ManyFiles_Distinct(t *testing.T) {}

func testReadFormManyFiles(t *testing.T, distinct bool) {}

func TestReadFormLimits(t *testing.T) {}

func TestReadFormEndlessHeaderLine(t *testing.T) {}

type neverendingReader

func (r neverendingReader) Read(p []byte) (n int, err error) {}

func BenchmarkReadForm(b *testing.B) {}