Use h2c from x/net to handle h2c requests
Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
This commit is contained in:
parent
c7d336f958
commit
4360ca14c1
224 changed files with 22414 additions and 11768 deletions
8
vendor/golang.org/x/net/publicsuffix/gen.go
generated
vendored
8
vendor/golang.org/x/net/publicsuffix/gen.go
generated
vendored
|
@ -100,6 +100,7 @@ var (
|
|||
labelsList = []string{}
|
||||
labelsMap = map[string]bool{}
|
||||
rules = []string{}
|
||||
numICANNRules = 0
|
||||
|
||||
// validSuffixRE is used to check that the entries in the public suffix
|
||||
// list are in canonical form (after Punycode encoding). Specifically,
|
||||
|
@ -167,11 +168,14 @@ func main1() error {
|
|||
}
|
||||
s = strings.TrimSpace(s)
|
||||
if strings.Contains(s, "BEGIN ICANN DOMAINS") {
|
||||
if len(rules) != 0 {
|
||||
return fmt.Errorf(`expected no rules before "BEGIN ICANN DOMAINS"`)
|
||||
}
|
||||
icann = true
|
||||
continue
|
||||
}
|
||||
if strings.Contains(s, "END ICANN DOMAINS") {
|
||||
icann = false
|
||||
icann, numICANNRules = false, len(rules)
|
||||
continue
|
||||
}
|
||||
if s == "" || strings.HasPrefix(s, "//") {
|
||||
|
@ -287,7 +291,7 @@ func gitCommit() (sha, date string, retErr error) {
|
|||
|
||||
func printTest(w io.Writer, n *node) error {
|
||||
fmt.Fprintf(w, "// generated by go run gen.go; DO NOT EDIT\n\n")
|
||||
fmt.Fprintf(w, "package publicsuffix\n\nvar rules = [...]string{\n")
|
||||
fmt.Fprintf(w, "package publicsuffix\n\nconst numICANNRules = %d\n\nvar rules = [...]string{\n", numICANNRules)
|
||||
for _, rule := range rules {
|
||||
fmt.Fprintf(w, "%q,\n", rule)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue