From 2cd2ff6f564dce5be0c4fb7f06338ff7af3fc9a9 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 8 Jun 2020 12:39:56 -0400 Subject: all: avoid awkward wording from CL 236857 CL 236857 removed all uses of whitelist/blacklist, which is great. But it substituted awkward phrasing using allowlist/blocklist, especially as verbs or participles. This CL uses more standard English, like "allow the function" or "blocked functions" instead of "allowlist the function" or "blocklisted functions". Change-Id: I9106a2fdbd62751c4cbda3a77181358a8a6d0f13 Reviewed-on: https://go-review.googlesource.com/c/go/+/236917 Run-TryBot: Russ Cox Reviewed-by: Ian Lance Taylor --- src/net/http/request.go | 2 +- src/net/http/server.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/net/http') diff --git a/src/net/http/request.go b/src/net/http/request.go index e4a00dd569..fe6b60982c 100644 --- a/src/net/http/request.go +++ b/src/net/http/request.go @@ -503,7 +503,7 @@ func valueOrDefault(value, def string) string { // NOTE: This is not intended to reflect the actual Go version being used. // It was changed at the time of Go 1.1 release because the former User-Agent -// had ended up on a blocklist for some intrusion detection systems. +// had ended up blocked by some intrusion detection systems. // See https://codereview.appspot.com/7532043. const defaultUserAgent = "Go-http-client/1.1" diff --git a/src/net/http/server.go b/src/net/http/server.go index a75dd1461f..a995a50658 100644 --- a/src/net/http/server.go +++ b/src/net/http/server.go @@ -1698,9 +1698,9 @@ func (c *conn) closeWriteAndWait() { time.Sleep(rstAvoidanceDelay) } -// validNextProto reports whether the proto is not a blocklisted ALPN -// protocol name. Empty and built-in protocol types are blocklisted -// and can't be overridden with alternate implementations. +// validNextProto reports whether the proto is a valid ALPN protocol name. +// Everything is valid except the empty string and built-in protocol types, +// so that those can't be overridden with alternate implementations. func validNextProto(proto string) bool { switch proto { case "", "http/1.1", "http/1.0": -- cgit v1.3