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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 24fc3234
......@@ -114,7 +114,7 @@ const (
certTypeRSAFixedDH = 3 // 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.
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.
......
......@@ -85,7 +85,7 @@ func prf30(result, secret, label, seed []byte) {
done := 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
// remain true. Each iteration gives us 16 bytes so 10 iterations will
// be sufficient.
......
......@@ -13,7 +13,7 @@ import (
// pkcs8 reflects an ASN.1, PKCS#8 PrivateKey. See
// ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-8/pkcs-8v1_2.asn
// and RFC5208.
// and RFC 5208.
type pkcs8 struct {
Version int
Algo pkix.AlgorithmIdentifier
......
......@@ -17,9 +17,9 @@ const ecPrivKeyVersion = 1
// ecPrivateKey reflects an ASN.1 Elliptic Curve Private Key Structure.
// References:
// RFC5915
// RFC 5915
// 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.
type ecPrivateKey struct {
Version int
......
......@@ -16,7 +16,7 @@ import (
"unicode/utf8"
)
// A WordEncoder is a RFC 2047 encoded-word encoder.
// A WordEncoder is an RFC 2047 encoded-word encoder.
type WordEncoder byte
const (
......
......@@ -15,7 +15,7 @@ type dnsNameTest struct {
}
var dnsNameTests = []dnsNameTest{
// RFC2181, section 11.
// RFC 2181, section 11.
{"_xmpp-server._tcp.google.com", true},
{"foo.com", true},
{"1foo.com", true},
......
......@@ -817,7 +817,7 @@ func readRequest(b *bufio.Reader, deleteHostHeader bool) (req *Request, err erro
}
req.Header = Header(mimeHeader)
// RFC2616: Must treat
// RFC 2616: Must treat
// GET /index.html HTTP/1.1
// Host: www.google.com
// and
......
......@@ -185,7 +185,7 @@ func ReadResponse(r *bufio.Reader, req *Request) (*Response, error) {
return resp, nil
}
// RFC2616: Should treat
// RFC 2616: Should treat
// Pragma: no-cache
// like
// Cache-Control: no-cache
......
......@@ -1747,7 +1747,7 @@ func Redirect(w ResponseWriter, r *Request, urlStr string, code int) {
w.Header().Set("Location", urlStr)
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.
// Shouldn't send the response for POST or HEAD; that leaves GET.
if r.Method == "GET" {
......
......@@ -276,7 +276,7 @@ func (t *transferReader) protoAtLeast(m, n int) bool {
}
// 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 {
switch {
case status >= 100 && status <= 199:
......@@ -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
// 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) {
case *Response:
if realLength == -1 &&
......
......@@ -570,7 +570,7 @@ func isQtext(c byte) bool {
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 {
var buf bytes.Buffer
buf.WriteByte('"')
......@@ -594,7 +594,7 @@ func isVchar(c byte) bool {
}
// 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 {
return c == ' ' || c == '\t'
}
......@@ -92,7 +92,7 @@ func TestDateParsing(t *testing.T) {
"Fri, 21 Nov 1997 09:55:06 -0600",
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.
{
"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