1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-27 17:05:36 +02:00
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
server

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
}