go/src/net/http/requestwrite_test.go

type reqWriteTest

var reqWriteTests

func TestRequestWrite(t *testing.T) {}

func TestRequestWriteTransport(t *testing.T) {}

type closeChecker

func (rc *closeChecker) Close() error {}

// TestRequestWriteClosesBody tests that Request.Write closes its request.Body.
// It also indirectly tests NewRequest and that it doesn't wrap an existing Closer
// inside a NopCloser, and that it serializes it correctly.
func TestRequestWriteClosesBody(t *testing.T) {}

func chunk(s string) string {}

func mustParseURL(s string) *url.URL {}

type writerFunc

func (f writerFunc) Write(p []byte) (int, error) {}

// TestRequestWriteError tests the Write err != nil checks in (*Request).write.
func TestRequestWriteError(t *testing.T) {}

// dumpRequestOut is a modified copy of net/http/httputil.DumpRequestOut.
// Unlike the original, this version doesn't mutate the req.Body and
// try to restore it. It always dumps the whole body.
// And it doesn't support https.
func dumpRequestOut(req *Request, onReadHeaders func()) ([]byte, error) {}

type delegateReader

func (r *delegateReader) Read(p []byte) (int, error) {}

type dumpConn

func (c *dumpConn) Close() error                       {}

func (c *dumpConn) LocalAddr() net.Addr                {}

func (c *dumpConn) RemoteAddr() net.Addr               {}

func (c *dumpConn) SetDeadline(t time.Time) error      {}

func (c *dumpConn) SetReadDeadline(t time.Time) error  {}

func (c *dumpConn) SetWriteDeadline(t time.Time) error {}