Liking cljdoc? Tell your friends :D

pantomime.web

Contains the same functions as pantomime.mime but is Web-oriented. Apache Tika as of April 2012 cannot detect PNG, JPEG and other image bytes for byte arrays. However, it is not uncommon to see broken Web frameworks, apps and servers that serve, say, PDF files claiming that they are text/html. pantomime.web attempts to improve the situation by providing special MIME type detection functions that can use content-based detection and Content-Type header at the same time.

Contains the same functions as pantomime.mime but is Web-oriented. Apache Tika as of April 2012 cannot
detect PNG, JPEG and other image bytes for byte arrays. However, it is not uncommon to see broken Web
frameworks, apps and servers that serve, say, PDF files claiming that they are text/html. pantomime.web
attempts to improve the situation by providing special MIME type detection functions that can use
content-based detection and Content-Type header at the same time.
raw docstring

detectorclj

source

MIMETypeDetectioncljprotocol

mime-type-ofclj

(mime-type-of body headers)

Returns MIME type of given response body, headers and url. Detection will try content-based detection (magic bytes, tag detection for XML-based formats, etc) for response body as well as Content-Type header.

Returns MIME type of given response body, headers and url. Detection will try content-based detection
(magic bytes, tag detection for XML-based formats, etc) for response body as well as
Content-Type header.
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close