Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBadProto = errors.New("bad protocol")
Functions ¶
func Http1ExtractHeaders ¶
Http1ExtractHeaders is an HTTP/1.0 and HTTP/1.1 header-only parser, to extract the original header names for the received request. Fully inspired by readMIMEHeader() in https://github.com/golang/go/blob/master/src/net/textproto/reader.go
Types ¶
type RequestReader ¶
type RequestReader struct {
// contains filtered or unexported fields
}
func NewRequestReader ¶
func NewRequestReader(preventCanonicalization bool, conn io.Reader) *RequestReader
func (*RequestReader) IsEOF ¶
func (r *RequestReader) IsEOF() bool
IsEOF returns true if there is no more data that can be read from the buffer and the underlying connection is closed.
func (*RequestReader) ReadRequest ¶
func (r *RequestReader) ReadRequest() (*http.Request, error)
func (*RequestReader) Reader ¶
func (r *RequestReader) Reader() *bufio.Reader
Reader is used to take over the buffered connection data (e.g. with HTTP/2 data). After calling this function, make sure to consume all the data related to the current request.
Click to show internal directories.
Click to hide internal directories.