Skip to content

Commit

Permalink
handle lowercasing in ct-test-srv
Browse files Browse the repository at this point in the history
  • Loading branch information
jsha committed Feb 11, 2025
1 parent d9d781f commit bfe2250
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/ct-test-srv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ func (is *integrationSrv) addRejectHost(w http.ResponseWriter, r *http.Request)

is.Lock()
defer is.Unlock()
is.rejectHosts[rejectHostReq.Host] = true

is.rejectHosts[strings.ToLower(rejectHostReq.Host)] = true
w.Write([]byte{})
}

Expand All @@ -101,7 +102,7 @@ func (is *integrationSrv) getRejections(w http.ResponseWriter, r *http.Request)
func (is *integrationSrv) shouldReject(host, chain string) bool {
is.Lock()
defer is.Unlock()
if is.rejectHosts[host] {
if is.rejectHosts[strings.ToLower(host)] {
is.rejected = append(is.rejected, chain)
return true
}
Expand Down

0 comments on commit bfe2250

Please sign in to comment.