parser

package
v0.0.0-...-a5b41cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2021 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StateURL .
	StateURL = 0

	// StateHeader .
	StateHeader = 1

	// StateBody .
	StateBody = 2
)
View Source
const (
	// LineTypeURL .
	LineTypeURL = 1
	// LineTypeHeader .
	LineTypeHeader = 2
	// LineTypeBody .
	LineTypeBody = 3
)
View Source
const (
	// CR .
	CR = '\r'
	// LF .
	LF = '\n'
	// COL .
	COL = ':'
	// SPA .
	SPA = ' '
)

Variables

View Source
var (
	// ErrDataNotEnouth .
	ErrDataNotEnouth = errors.New("data not enougth")
	// ErrInvalidData .
	ErrInvalidData = errors.New("invalid data")
)

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser .

func New

func New() *Parser

New .

func (*Parser) Append

func (p *Parser) Append(buf []byte)

Append .

func (*Parser) ReadBody

func (p *Parser) ReadBody(data []byte) (*http.Request, bool, error)

ReadBody .

func (*Parser) ReadHeader

func (p *Parser) ReadHeader(data []byte) (*http.Request, bool, error)

ReadHeader .

func (*Parser) ReadRequest

func (p *Parser) ReadRequest(data []byte) (*http.Request, bool, error)

ReadRequest .

func (*Parser) ReadRequestLine

func (p *Parser) ReadRequestLine(data []byte) (*http.Request, bool, error)

ReadRequestLine .

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL