Variable: eww-guess-content-type-functions
eww-guess-content-type-functions is a customizable variable defined in
eww.el.gz.
Value
(eww--html-if-doctype)
Documentation
List of functions used by EWW to guess the content-type of Web pages.
These are only used when the page does not have a valid Content-Type header. Functions are called in order, until one of them returns a non-nil value to be used as Content-Type. The functions receive two arguments: an alist of page's headers, and the buffer that holds the complete response of the server from which the page was requested. If the list of the functions is exhausted without any non-nil value, EWW assumes content-type is "application/octet-stream", per RFC-9110.
This variable was added, or its default value changed, in Emacs 31.1.
Probably introduced at or before Emacs version 31.1.
Source Code
;; Defined in /usr/src/emacs/lisp/net/eww.el.gz
(defcustom eww-guess-content-type-functions
'(eww--html-if-doctype)
"List of functions used by EWW to guess the content-type of Web pages.
These are only used when the page does not have a valid Content-Type
header. Functions are called in order, until one of them returns a
non-nil value to be used as Content-Type. The functions receive two
arguments: an alist of page's headers, and the buffer that holds the
complete response of the server from which the page was requested.
If the list of the functions is exhausted without any non-nil value,
EWW assumes content-type is \"application/octet-stream\", per RFC-9110."
:version "31.1"
:type '(repeat function))