Skip to content

Commit

Permalink
fix possible nil panic (#2809)
Browse files Browse the repository at this point in the history
  • Loading branch information
NyaaaWhatsUpDoc authored Apr 4, 2024
1 parent 236604b commit 83e7847
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/api/util/mime.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func isUTF8ContentType(p []string) ([]string, bool) {
for i, part := range p {

// Only handle charset slice parts.
if part[:len(charset)] == charset {
if strings.HasPrefix(part, charset) {

// Check if is UTF-8 charset.
ok := (part == charsetUTF8)
Expand Down

0 comments on commit 83e7847

Please sign in to comment.