Opens a new window with list of versions in this module.
Published: May 11, 2023
Opens a new window with license information.
Opens a new window with list of imports.
Imported by: 9
Opens a new window with list of known importers.
Package httputil provides HTTP utility functions.
GetHostname returns the hostname from request Host field.
It returns empty string, if Host field contains invalid
value (e.g. "localhost:::" with too many colons).
GracefulClose drains http.Response.Body until it hits EOF
and closes it. This prevents TCP/TLS connections from closing,
therefore available for reuse.
Borrowed from golang/net/context/ctxhttp/cancelreq.go.
Click to show internal directories.
Click to hide internal directories.