mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-22 07:09:54 +00:00
; Improve documentation of 'eww-guess-content-type-functions'
* lisp/net/eww.el (eww-guess-content-type-functions): Doc fix. * etc/NEWS: Announce 'eww-guess-content-type-functions'. Bug#73133
This commit is contained in:
parent
9074a9f496
commit
9fdc03e8f9
7
etc/NEWS
7
etc/NEWS
@ -317,6 +317,13 @@ will now automatically turn on 'visual-wrap-prefix-mode' in addition to
|
||||
near window edge and the continuation lines are indented using prefixes
|
||||
computed from surrounding context.
|
||||
|
||||
---
|
||||
*** New user option 'eww-guess-content-type-functions'.
|
||||
The value is a list of functions that EWW should call to determine the
|
||||
content-type of Web pages which don't have a valid 'Content-Type'
|
||||
header. The default value is a function that considers a page with an
|
||||
HTML 'doctype' declaration to have context-type "text/html".
|
||||
|
||||
** CC mode
|
||||
|
||||
+++
|
||||
|
@ -111,13 +111,14 @@ duplicate entries (if any) removed."
|
||||
|
||||
(defcustom eww-guess-content-type-functions
|
||||
'(eww--html-if-doctype)
|
||||
"List of functions used to guess a page's content-type.
|
||||
"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 the
|
||||
value to be used as Content-Type. They receive two parameters: an alist
|
||||
of headers, and the buffer that holds the complete response. If the
|
||||
list is exhausted, EWW assumes \"application/octet-stream\" per
|
||||
RFC-9110."
|
||||
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"
|
||||
:group 'eww
|
||||
:type '(repeat function))
|
||||
|
Loading…
Reference in New Issue
Block a user