Commit 022548cf authored by Dan Peterson's avatar Dan Peterson Committed by Brad Fitzpatrick

all: standardize RFC mention format

Standardize on space between "RFC" and number. Additionally change
the couple "a RFC" instances to "an RFC."

Fixes #15258

Change-Id: I2b17ecd06be07dfbb4207c690f52a59ea9b04808
Reviewed-on: https://go-review.googlesource.com/21902Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 24fc3234
...@@ -114,7 +114,7 @@ const ( ...@@ -114,7 +114,7 @@ const (
certTypeRSAFixedDH = 3 // A certificate containing a static DH key certTypeRSAFixedDH = 3 // A certificate containing a static DH key
certTypeDSSFixedDH = 4 // A certificate containing a static DH key certTypeDSSFixedDH = 4 // A certificate containing a static DH key
// See RFC4492 sections 3 and 5.5. // See RFC 4492 sections 3 and 5.5.
certTypeECDSASign = 64 // A certificate containing an ECDSA-capable public key, signed with ECDSA. certTypeECDSASign = 64 // A certificate containing an ECDSA-capable public key, signed with ECDSA.
certTypeRSAFixedECDH = 65 // A certificate containing an ECDH-capable public key, signed with RSA. certTypeRSAFixedECDH = 65 // A certificate containing an ECDH-capable public key, signed with RSA.
certTypeECDSAFixedECDH = 66 // A certificate containing an ECDH-capable public key, signed with ECDSA. certTypeECDSAFixedECDH = 66 // A certificate containing an ECDH-capable public key, signed with ECDSA.
......
...@@ -85,7 +85,7 @@ func prf30(result, secret, label, seed []byte) { ...@@ -85,7 +85,7 @@ func prf30(result, secret, label, seed []byte) {
done := 0 done := 0
i := 0 i := 0
// RFC5246 section 6.3 says that the largest PRF output needed is 128 // RFC 5246 section 6.3 says that the largest PRF output needed is 128
// bytes. Since no more ciphersuites will be added to SSLv3, this will // bytes. Since no more ciphersuites will be added to SSLv3, this will
// remain true. Each iteration gives us 16 bytes so 10 iterations will // remain true. Each iteration gives us 16 bytes so 10 iterations will
// be sufficient. // be sufficient.
......
...@@ -13,7 +13,7 @@ import ( ...@@ -13,7 +13,7 @@ import (
// pkcs8 reflects an ASN.1, PKCS#8 PrivateKey. See // pkcs8 reflects an ASN.1, PKCS#8 PrivateKey. See
// ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-8/pkcs-8v1_2.asn // ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-8/pkcs-8v1_2.asn
// and RFC5208. // and RFC 5208.
type pkcs8 struct { type pkcs8 struct {
Version int Version int
Algo pkix.AlgorithmIdentifier Algo pkix.AlgorithmIdentifier
......
...@@ -17,9 +17,9 @@ const ecPrivKeyVersion = 1 ...@@ -17,9 +17,9 @@ const ecPrivKeyVersion = 1
// ecPrivateKey reflects an ASN.1 Elliptic Curve Private Key Structure. // ecPrivateKey reflects an ASN.1 Elliptic Curve Private Key Structure.
// References: // References:
// RFC5915 // RFC 5915
// SEC1 - http://www.secg.org/sec1-v2.pdf // SEC1 - http://www.secg.org/sec1-v2.pdf
// Per RFC5915 the NamedCurveOID is marked as ASN.1 OPTIONAL, however in // Per RFC 5915 the NamedCurveOID is marked as ASN.1 OPTIONAL, however in
// most cases it is not. // most cases it is not.
type ecPrivateKey struct { type ecPrivateKey struct {
Version int Version int
......
...@@ -16,7 +16,7 @@ import ( ...@@ -16,7 +16,7 @@ import (
"unicode/utf8" "unicode/utf8"
) )
// A WordEncoder is a RFC 2047 encoded-word encoder. // A WordEncoder is an RFC 2047 encoded-word encoder.
type WordEncoder byte type WordEncoder byte
const ( const (
......
...@@ -15,7 +15,7 @@ type dnsNameTest struct { ...@@ -15,7 +15,7 @@ type dnsNameTest struct {
} }
var dnsNameTests = []dnsNameTest{ var dnsNameTests = []dnsNameTest{
// RFC2181, section 11. // RFC 2181, section 11.
{"_xmpp-server._tcp.google.com", true}, {"_xmpp-server._tcp.google.com", true},
{"foo.com", true}, {"foo.com", true},
{"1foo.com", true}, {"1foo.com", true},
......
...@@ -817,7 +817,7 @@ func readRequest(b *bufio.Reader, deleteHostHeader bool) (req *Request, err erro ...@@ -817,7 +817,7 @@ func readRequest(b *bufio.Reader, deleteHostHeader bool) (req *Request, err erro
} }
req.Header = Header(mimeHeader) req.Header = Header(mimeHeader)
// RFC2616: Must treat // RFC 2616: Must treat
// GET /index.html HTTP/1.1 // GET /index.html HTTP/1.1
// Host: www.google.com // Host: www.google.com
// and // and
......
...@@ -185,7 +185,7 @@ func ReadResponse(r *bufio.Reader, req *Request) (*Response, error) { ...@@ -185,7 +185,7 @@ func ReadResponse(r *bufio.Reader, req *Request) (*Response, error) {
return resp, nil return resp, nil
} }
// RFC2616: Should treat // RFC 2616: Should treat
// Pragma: no-cache // Pragma: no-cache
// like // like
// Cache-Control: no-cache // Cache-Control: no-cache
......
...@@ -1747,7 +1747,7 @@ func Redirect(w ResponseWriter, r *Request, urlStr string, code int) { ...@@ -1747,7 +1747,7 @@ func Redirect(w ResponseWriter, r *Request, urlStr string, code int) {
w.Header().Set("Location", urlStr) w.Header().Set("Location", urlStr)
w.WriteHeader(code) w.WriteHeader(code)
// RFC2616 recommends that a short note "SHOULD" be included in the // RFC 2616 recommends that a short note "SHOULD" be included in the
// response because older user agents may not understand 301/307. // response because older user agents may not understand 301/307.
// Shouldn't send the response for POST or HEAD; that leaves GET. // Shouldn't send the response for POST or HEAD; that leaves GET.
if r.Method == "GET" { if r.Method == "GET" {
......
...@@ -276,7 +276,7 @@ func (t *transferReader) protoAtLeast(m, n int) bool { ...@@ -276,7 +276,7 @@ func (t *transferReader) protoAtLeast(m, n int) bool {
} }
// bodyAllowedForStatus reports whether a given response status code // bodyAllowedForStatus reports whether a given response status code
// permits a body. See RFC2616, section 4.4. // permits a body. See RFC 2616, section 4.4.
func bodyAllowedForStatus(status int) bool { func bodyAllowedForStatus(status int) bool {
switch { switch {
case status >= 100 && status <= 199: case status >= 100 && status <= 199:
...@@ -368,7 +368,7 @@ func readTransfer(msg interface{}, r *bufio.Reader) (err error) { ...@@ -368,7 +368,7 @@ func readTransfer(msg interface{}, r *bufio.Reader) (err error) {
// If there is no Content-Length or chunked Transfer-Encoding on a *Response // If there is no Content-Length or chunked Transfer-Encoding on a *Response
// and the status is not 1xx, 204 or 304, then the body is unbounded. // and the status is not 1xx, 204 or 304, then the body is unbounded.
// See RFC2616, section 4.4. // See RFC 2616, section 4.4.
switch msg.(type) { switch msg.(type) {
case *Response: case *Response:
if realLength == -1 && if realLength == -1 &&
......
...@@ -570,7 +570,7 @@ func isQtext(c byte) bool { ...@@ -570,7 +570,7 @@ func isQtext(c byte) bool {
return '!' <= c && c <= '~' return '!' <= c && c <= '~'
} }
// quoteString renders a string as a RFC5322 quoted-string. // quoteString renders a string as an RFC 5322 quoted-string.
func quoteString(s string) string { func quoteString(s string) string {
var buf bytes.Buffer var buf bytes.Buffer
buf.WriteByte('"') buf.WriteByte('"')
...@@ -594,7 +594,7 @@ func isVchar(c byte) bool { ...@@ -594,7 +594,7 @@ func isVchar(c byte) bool {
} }
// isWSP reports whether c is a WSP (white space). // isWSP reports whether c is a WSP (white space).
// WSP is a space or horizontal tab (RFC5234 Appendix B). // WSP is a space or horizontal tab (RFC 5234 Appendix B).
func isWSP(c byte) bool { func isWSP(c byte) bool {
return c == ' ' || c == '\t' return c == ' ' || c == '\t'
} }
...@@ -92,7 +92,7 @@ func TestDateParsing(t *testing.T) { ...@@ -92,7 +92,7 @@ func TestDateParsing(t *testing.T) {
"Fri, 21 Nov 1997 09:55:06 -0600", "Fri, 21 Nov 1997 09:55:06 -0600",
time.Date(1997, 11, 21, 9, 55, 6, 0, time.FixedZone("", -6*60*60)), time.Date(1997, 11, 21, 9, 55, 6, 0, time.FixedZone("", -6*60*60)),
}, },
// RFC5322, Appendix A.6.2 // RFC 5322, Appendix A.6.2
// Obsolete date. // Obsolete date.
{ {
"21 Nov 97 09:55:06 GMT", "21 Nov 97 09:55:06 GMT",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment