http

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP1 version = iota
	HTTP2
)

Variables

This section is empty.

Functions

func ApplyTrustedXForwardedFor

func ApplyTrustedXForwardedFor(header http.Header, trusted []string, remoteAddr net.Addr) net.Addr

ApplyTrustedXForwardedFor returns remoteAddr overridden by X-Forwarded-For only when a configured trusted header is present.

func ParseHost

func ParseHost(rawHost string, defaultPort net.Port) (net.Destination, error)

ParseHost splits host and port from a raw string. Default port is used when raw string doesn't contain port.

func RemoveHopByHopHeaders

func RemoveHopByHopHeaders(header http.Header)

RemoveHopByHopHeaders removes hop by hop headers in http header list.

Types

type SniffHeader

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

func SniffHTTP

func SniffHTTP(b []byte, c context.Context) (*SniffHeader, error)

func (*SniffHeader) Domain

func (h *SniffHeader) Domain() string

func (*SniffHeader) Protocol

func (h *SniffHeader) Protocol() string

Jump to

Keyboard shortcuts

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