http

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2021 License: GPL-3.0 Imports: 15 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBasicProxyAuthorization

func DecodeBasicProxyAuthorization(credential string) (string, string, error)

DecodeBasicProxyAuthorization decode base64-encoded credential

func HandleConn

func HandleConn(c net.Conn, in chan<- C.ConnContext, cache *cache.Cache)

func ParseBasicProxyAuthorization

func ParseBasicProxyAuthorization(request *http.Request) string

ParseBasicProxyAuthorization parse header Proxy-Authorization and return base64-encoded credential

func ReadRequest

func ReadRequest(b *bufio.Reader, deleteHostHeader bool) (req *http.Request, err error)

func RemoveExtraHTTPHostPort

func RemoveExtraHTTPHostPort(req *http.Request)

RemoveExtraHTTPHostPort remove extra host port (example.com:80 --> example.com) It resolves the behavior of some HTTP servers that do not handle host:80 (e.g. baidu.com)

func RemoveHopByHopHeaders

func RemoveHopByHopHeaders(header http.Header)

RemoveHopByHopHeaders remove hop-by-hop header

Types

type Listener

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

func New

func New(addr string, in chan<- C.ConnContext) (*Listener, error)

func NewWithAuthenticate

func NewWithAuthenticate(addr string, in chan<- C.ConnContext, authenticate bool) (*Listener, error)

func (*Listener) Address

func (l *Listener) Address() string

func (*Listener) Close

func (l *Listener) Close()

Jump to

Keyboard shortcuts

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