Skip to content

Commit bfbfdbd

Browse files
author
Antonio Nesic
committed
Fix for SplitSeq
1 parent 649cfbf commit bfbfdbd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

middleware/hostauthorization/hostauthorization.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func validateHostLength(host string) {
7373
if strings.IndexByte(host, ':') >= 0 {
7474
return
7575
}
76-
for _, label := range strings.Split(host, ".") {
76+
for label := range strings.SplitSeq(host, ".") {
7777
if len(label) > maxLabelLength {
7878
panic(fmt.Sprintf("hostauthorization: host %q has label %q exceeding RFC 1035 limit of %d characters (%d chars)",
7979
host, label, maxLabelLength, len(label)))

0 commit comments

Comments
 (0)