mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
net/textproto: document enforcement of RFC 9112 for headers
Fixes #68590 Change-Id: Ie7cf1fe8379182f86317d5ebb7f45a404ecd70e9 Reviewed-on: https://go-review.googlesource.com/c/go/+/601555 Auto-Submit: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Damien Neil <dneil@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
2ce1fb4220
commit
3b9d10cce7
@ -642,8 +642,8 @@ func (r *Reader) upcomingHeaderKeys() (n int) {
|
||||
// the rest are converted to lowercase. For example, the
|
||||
// canonical key for "accept-encoding" is "Accept-Encoding".
|
||||
// MIME header keys are assumed to be ASCII only.
|
||||
// If s contains a space or invalid header field bytes, it is
|
||||
// returned without modifications.
|
||||
// If s contains a space or invalid header field bytes as
|
||||
// defined by RFC 9112, it is returned without modifications.
|
||||
func CanonicalMIMEHeaderKey(s string) string {
|
||||
// Quick check for canonical encoding.
|
||||
upper := true
|
||||
|
@ -5,6 +5,9 @@
|
||||
// Package textproto implements generic support for text-based request/response
|
||||
// protocols in the style of HTTP, NNTP, and SMTP.
|
||||
//
|
||||
// This package enforces the HTTP/1.1 character set defined by
|
||||
// RFC 9112 for header keys and values.
|
||||
//
|
||||
// The package provides:
|
||||
//
|
||||
// [Error], which represents a numeric error response from
|
||||
|
Loading…
x
Reference in New Issue
Block a user