mirror of
https://github.com/gotenberg/gotenberg.git
synced 2026-08-18 05:02:15 +01:00
tests for http package
This commit is contained in:
@@ -33,7 +33,7 @@ func (e *notAuthorizedContentTypeError) Error() string {
|
||||
// FindAuthorizedContentType tries to return a content type according to a request header.
|
||||
// If no authorized content type found, throws an error.
|
||||
func FindAuthorizedContentType(h http.Header) (ContentType, error) {
|
||||
ct := findContentType(h.Get("Content-Type"), HTMLContentType, OctetStreamContentType, MultipartFormDataContentType)
|
||||
ct := findContentType(h.Get("Content-Type"), OctetStreamContentType, MultipartFormDataContentType)
|
||||
if ct == "" {
|
||||
return "", ¬AuthorizedContentTypeError{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user