Documentation ¶
Index ¶
- Variables
- func AcquireBodyStream(b *bytebufferpool.ByteBuffer, r network.Reader, contentLength int) io.Reader
- func BufferSnippet(b []byte) string
- func HasHeaderValue(s, value []byte) bool
- func HeaderError(typ string, err, errParse error, b []byte) error
- func LimitedReaderSize(r io.Reader) int64
- func MustDiscard(r network.Reader, n int)
- func MustPeekBuffered(r network.Reader) []byte
- func ReadBody(r network.Reader, contentLength, maxBodySize int, dst []byte) ([]byte, error)
- func ReadBodyWithStreaming(zr network.Reader, contentLength, maxBodySize int, dst []byte) (b []byte, err error)
- func ReadRawHeaders(dst, buf []byte) ([]byte, int, error)
- func ReleaseBodyStream(requestReader io.Reader) (err error)
- func WriteBodyChunked(w network.Writer, r io.Reader) error
- func WriteBodyFixedSize(w network.Writer, r io.Reader, size int64) error
- type HeaderScanner
- type HeaderValueScanner
Constants ¶
This section is empty.
Variables ¶
View Source
var NoBody = noBody{}
NoBody is an io.ReadCloser with no bytes. Read always returns EOF and Close always returns nil. It can be used in an outgoing client request to explicitly signal that a request has zero bytes. An alternative, however, is to simply set Request.Body to nil.
Functions ¶
func AcquireBodyStream ¶
func AcquireBodyStream(b *bytebufferpool.ByteBuffer, r network.Reader, contentLength int) io.Reader
func BufferSnippet ¶
func HasHeaderValue ¶
func LimitedReaderSize ¶
func MustDiscard ¶
func MustPeekBuffered ¶
func ReadBodyWithStreaming ¶
func ReleaseBodyStream ¶
ReleaseBodyStream releases the body stream.
NOTE: Be careful to use this method unless you know what it's for.
Types ¶
type HeaderScanner ¶
type HeaderScanner struct { B []byte Key []byte Value []byte Err error // HLen stores header subslice len HLen int DisableNormalizing bool // contains filtered or unexported fields }
func (*HeaderScanner) Next ¶
func (s *HeaderScanner) Next() bool
type HeaderValueScanner ¶
Click to show internal directories.
Click to hide internal directories.