github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/net/http/dummy.go (about)

     1  package http
     2  
     3  import (
     4  	"errors"
     5  
     6  	"github.com/shogo82148/std/context"
     7  	"github.com/shogo82148/std/io"
     8  	"github.com/shogo82148/std/net"
     9  )
    10  
    11  const defaultUserAgent = "Go-http-client/1.1"
    12  
    13  var newLoggingConn any
    14  var appendTime any
    15  var refererForURL any
    16  
    17  func (s *Server) newConn(c net.Conn)
    18  
    19  type conn struct{}
    20  
    21  var errRequestCanceled = errors.New("net/http: request canceled")
    22  var errRequestCanceledConn = errors.New("net/http: request canceled while waiting for connection")
    23  var errServerClosedIdle = errors.New("net/http: server closed idle connection")
    24  
    25  func serveFile(w ResponseWriter, r *Request, fsys FileSystem, name string)
    26  func scanETag(etag string) (string, bool)
    27  func http2ConfigureServer()
    28  func shouldCopyHeaderOnRedirect(header string) bool
    29  func writeStatusLine(w ResponseWriter, proto, status string)
    30  func is408Message(status string) bool
    31  
    32  var maxWriteWaitBeforeConnReuse any
    33  
    34  type hookSetter any
    35  
    36  var testHookEnterRoundTrip any
    37  var testHookRoundTripRetried any
    38  
    39  type http2clientConnPoolIdleCloser any
    40  type http2clientConnPool struct{}
    41  type http2noDialClientConnPool struct{}
    42  
    43  type http2responseWriter struct{}
    44  
    45  func (*http2responseWriter) CloseNotify() <-chan bool
    46  
    47  func (w *http2responseWriter) Flush()
    48  
    49  func (w *http2responseWriter) Push(target string, opts *PushOptions) error
    50  
    51  type http2stringWriter any
    52  
    53  type noBody struct{}
    54  
    55  func (noBody) WriteTo(w io.Writer) (n int64, err error)
    56  
    57  func (noBody) Read(p []byte) (n int, err error)
    58  
    59  func (noBody) Close() error
    60  
    61  type httpRange struct{ a, b int }
    62  
    63  type contextKey struct{ name string }
    64  
    65  type closeWriter any
    66  
    67  type muxEntry struct{}
    68  
    69  var defaultServeMux ServeMux
    70  
    71  type timeoutWriter struct{}
    72  
    73  func (*timeoutWriter) Push(target string, opts *PushOptions) error
    74  
    75  func defaultTransportDialContext(*net.Dialer) func(ctx context.Context, network string, addr string) (net.Conn, error)
    76  
    77  type connectMethodKey struct{}
    78  
    79  type persistConn struct{}
    80  
    81  type wantConnQueue struct{}
    82  
    83  type connLRU struct{}
    84  
    85  type cancelKey struct{}
    86  
    87  type h2Transport struct{}
    88  
    89  type persistConnWriter struct{}
    90  
    91  func (*persistConnWriter) ReadFrom(r io.Reader) (n int64, err error)