Documentation
¶
Overview ¶
Package httpwriter resolves optional net/http response-writer capabilities through bounded Unwrap chains.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilWriter = errors.New("httpwriter: response writer is nil") ErrNilUnwrap = errors.New("httpwriter: Unwrap returned nil") ErrUnwrapCycle = errors.New("httpwriter: Unwrap cycle detected") ErrUnwrapDepth = errors.New("httpwriter: Unwrap depth exceeded") )
Hijacker resolution errors are internal capability diagnostics. Callers can use errors.Is to distinguish an unsupported writer from a malformed chain.
Functions ¶
func Hijack ¶
func Hijack(w http.ResponseWriter) (net.Conn, *bufio.ReadWriter, error)
Hijack resolves and invokes the effective http.Hijacker behind w.
func ResolveHijacker ¶
func ResolveHijacker(w http.ResponseWriter) (http.Hijacker, error)
ResolveHijacker finds the effective http.Hijacker behind w.
Unwrap takes precedence over a forwarding Hijack method on the same dynamic writer. This prevents a wrapper from advertising Hijacker when its effective underlying writer cannot actually support it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.