plugin/file: preserve case in SRV record names and targets per RFC 6763 (#7402)

This commit is contained in:
Syed Azeez
2025-07-15 07:26:59 +05:30
committed by GitHub
parent ff88ad37f7
commit d8906ce610
3 changed files with 53 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ package tree
import (
"bytes"
"strings"
"github.com/miekg/dns"
)
@@ -27,8 +28,8 @@ func less(a, b string) int {
// sadly this []byte will allocate... TODO(miek): check if this is needed
// for a name, otherwise compare the strings.
ab := []byte(a[ai:aj])
bb := []byte(b[bi:bj])
ab := []byte(strings.ToLower(a[ai:aj]))
bb := []byte(strings.ToLower(b[bi:bj]))
doDDD(ab)
doDDD(bb)