http

package
v0.0.0-...-f1bff1d Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

README

Library to parse HTTP traffic from packet captures.

It performs preliminary processing to convert raw packets into akinet.HTTPRequest and akinet.HTTPResponse objects. In particular, it dechunks bodies with Transfer-Encoding: chunked, but keeps Content-Encoding unchanged.

Note that this library returns an error for non-chunked Transfer-Encoding. This is due to the limitations of the go library used to read HTTP request/response and it's not easy to fix short of writing our own HTTP parser.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Default maximum HTTP length supported.
	// Can be altered by the CLI as a configuration setting, but doing so after parsing
	// has started will be a race condition.
	MaximumHTTPLength int64 = 1024 * 1024
)

Functions

func NewHTTPRequestParserFactory

func NewHTTPRequestParserFactory(pool buffer_pool.BufferPool) akinet.TCPParserFactory

Returns a factory for creating HTTP requests whose bodies will be allocated from the given buffer pool.

func NewHTTPResponseParserFactory

func NewHTTPResponseParserFactory(pool buffer_pool.BufferPool) akinet.TCPParserFactory

Returns a factory for creating HTTP responses whose bodies will be allocated from the given buffer pool.

Types

This section is empty.

Jump to

Keyboard shortcuts

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