]> git.eshelyaron.com Git - emacs.git/commitdiff
* eww.el (eww-render): Protect against empty content-types.
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 24 Jan 2016 16:50:27 +0000 (17:50 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 24 Jan 2016 16:50:27 +0000 (17:50 +0100)
lisp/net/eww.el

index 48bf556a526e255fd5934cc215a4ef02d911aefe..29cde247e6167326577d5e62c5ceca38df065a78 100644 (file)
@@ -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)))