File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -642,8 +642,8 @@ func (r *Reader) upcomingHeaderKeys() (n int) {
642
642
// the rest are converted to lowercase. For example, the
643
643
// canonical key for "accept-encoding" is "Accept-Encoding".
644
644
// MIME header keys are assumed to be ASCII only.
645
- // If s contains a space or invalid header field bytes, it is
646
- // returned without modifications.
645
+ // If s contains a space or invalid header field bytes as
646
+ // defined by RFC 9112, it is returned without modifications.
647
647
func CanonicalMIMEHeaderKey (s string ) string {
648
648
// Quick check for canonical encoding.
649
649
upper := true
Original file line number Diff line number Diff line change 5
5
// Package textproto implements generic support for text-based request/response
6
6
// protocols in the style of HTTP, NNTP, and SMTP.
7
7
//
8
+ // This package enforces the HTTP/1.1 character set defined by
9
+ // RFC 9112 for header keys and values.
10
+ //
8
11
// The package provides:
9
12
//
10
13
// [Error], which represents a numeric error response from
You can’t perform that action at this time.
0 commit comments