Documentation
¶
Overview ¶
Package common provides shared utilities for HTTP transport implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsWeakETag ¶
IsWeakETag reports whether the ETag is a weak validator (W/"...") which must not be used with If-Range per RFC 7232 §2.1.
func ParseContentRange ¶
ParseContentRange parses "Content-Range: bytes start-end/total". It returns (start, end, total, ok). When total is unknown, total == -1.
func ParseSingleRange ¶
ParseSingleRange parses a single "Range: bytes=start-end" header. It returns (start, end, ok). When end is omitted, end == -1.
Notes:
- Only absolute-start forms are supported (no suffix ranges "-N").
- Multi-range specifications (comma separated) return ok == false.
func ScrubConditionalHeaders ¶
ScrubConditionalHeaders removes conditional headers we do not want to forward on range requests, because they can alter semantics or conflict with If-Range logic.
func SupportsRange ¶
SupportsRange determines whether an HTTP response indicates support for range requests.
Types ¶
This section is empty.