From: Lars Ingebrigtsen Date: Sun, 24 Jan 2016 16:50:27 +0000 (+0100) Subject: * eww.el (eww-render): Protect against empty content-types. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~23^2~877 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7faf9193cdc503d1d0c8a1d3ffe12a8bd6bce16b;p=emacs.git * eww.el (eww-render): Protect against empty content-types. --- diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 48bf556a526..29cde247e61 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -315,8 +315,9 @@ Currently this means either text/html or application/xhtml+xml." (let* ((headers (eww-parse-headers)) (content-type (mail-header-parse-content-type - (or (cdr (assoc "content-type" headers)) - "text/plain"))) + (if (zerop (length (cdr (assoc "content-type" headers)))) + "text/plain" + (cdr (assoc "content-type" headers))))) (charset (intern (downcase (or (cdr (assq 'charset (cdr content-type)))