Add the zlib prefix to `decompress-gzipped-region'

This commit is contained in:
Lars Magne Ingebrigtsen 2013-08-12 15:54:45 +02:00
parent 594a430782
commit 8a44a18468
6 changed files with 19 additions and 7 deletions

View file

@ -860,13 +860,14 @@ should be shown to the user."
(defun url-handle-content-transfer-encoding ()
(let ((encoding (mail-fetch-field "content-encoding")))
(when (and encoding
(fboundp 'decompress-gzipped-region)
(fboundp 'zlib-decompress-gzipped-region)
(zlib-available-p)
(equal (downcase encoding) "gzip"))
(save-restriction
(widen)
(goto-char (point-min))
(when (search-forward "\n\n")
(decompress-gzipped-region (point) (point-max)))))))
(zlib-decompress-gzipped-region (point) (point-max)))))))
;; Miscellaneous
(defun url-http-activate-callback ()