Header constructor
Header(
- String name,
- String? value, [
- HeaderEncoding encoding = HeaderEncoding.none
Creates a new header
Line breaks in name and value are replaced by a single space, so
that a header value can neither start another header nor terminate the
header section (header injection). Folding is applied in render.
Implementation
Header(String name, String? value, [this.encoding = HeaderEncoding.none])
: name = sanitize(name),
value = value == null ? null : sanitize(value),
lowerCaseName = sanitize(name).toLowerCase();