summaryrefslogtreecommitdiff
path: root/lisp/url
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2013-08-12 15:54:45 +0200
committerLars Magne Ingebrigtsen <larsi@gnus.org>2013-08-12 15:54:45 +0200
commit8a44a184685092e2f39c9355467defde0b8b030c (patch)
treeb5ecedafe78e402b50b0d9a1494477935789e07b /lisp/url
parent594a430782d12499543637915fd974483523f500 (diff)
downloademacs-8a44a184685092e2f39c9355467defde0b8b030c.tar.gz
Add the zlib prefix to `decompress-gzipped-region'
Diffstat (limited to 'lisp/url')
-rw-r--r--lisp/url/ChangeLog6
-rw-r--r--lisp/url/url-http.el5
-rw-r--r--lisp/url/url-vars.el2
3 files changed, 10 insertions, 3 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 9bdaff6f51a..7ac445e03c1 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,9 @@
+2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * url-http.el (url-handle-content-transfer-encoding): Renamed
+ `zlib-decompress-gzipped-region' and check whether it's available,
+ too.
+
2013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
* url-vars.el (url-mime-encoding-string): If we have built-in gzip
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index beffbe1f79b..9eab1a6f683 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -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 ()
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index a59667b57b0..786b5533bf8 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -210,7 +210,7 @@ Should be an assoc list of headers/contents.")
(defvar url-request-method nil "The method to use for the next request.")
-(defvar url-mime-encoding-string (and (fboundp 'decompress-gzipped-region)
+(defvar url-mime-encoding-string (and (fboundp 'zlib-decompress-gzipped-region)
"gzip")
"String to send in the Accept-encoding: field in HTTP requests.")