Skip to content

Commit

Permalink
perf: optimize the http.ContentType method (#3363)
Browse files Browse the repository at this point in the history
Co-authored-by: huangzw <[email protected]>
  • Loading branch information
1911860538 and huangzw authored Aug 19, 2024
1 parent d50609d commit 2f94905
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/httputil/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const (

// ContentType returns the content-type with base prefix.
func ContentType(subtype string) string {
return strings.Join([]string{baseContentType, subtype}, "/")
return baseContentType + "/" + subtype
}

// ContentSubtype returns the content-subtype for the given content-type. The
Expand Down

0 comments on commit 2f94905

Please sign in to comment.