This repository has been archived by the owner on Dec 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
doc.go
23 lines (19 loc) · 1.11 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
Package httpheader parses and generates standard HTTP headers.
For each header Foo-Bar covered by this package, there is a function FooBar
to parse it, SetFooBar to generate it, and sometimes AddFooBar to append to it.
Note that AddFooBar creates a new Foo-Bar header line (like http.Header's
Add method), which, although correct, is poorly supported by some recipients.
FooBar parses all valid Foo-Bar headers, but many invalid headers are also
tolerated and parsed to some extent. FooBar never errors, instead returning
whatever it can easily salvage. Do not assume that strings returned by FooBar
conform to the grammar of the protocol.
Likewise, SetFooBar doesn't validate parameter names or other tokens you supply.
However, it will automatically quote and escape your text where the grammar
admits an arbitrary quoted string or comment (RFC 7230 Section 3.2.6), such as
in parameter values.
Tokens that are known to be case-insensitive, like directive or parameter names,
are lowercased by FooBar, unless documented otherwise. Any maps returned by FooBar
may be nil when there is no corresponding data.
*/
package httpheader