This commit is contained in:
binwiederhier 2023-04-21 21:07:07 -04:00
parent 6b1f72fec9
commit 35eac5b9ad
3 changed files with 10 additions and 14 deletions

View file

@ -117,3 +117,11 @@ func fromContext[T any](r *http.Request, key contextKey) (T, error) {
}
return t, nil
}
func maybeDecodeHeader(header string) string {
decoded, err := mimeDecoder.DecodeHeader(header)
if err != nil {
return header
}
return decoded
}