aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2013-08-12 15:54:45 +0200
committerLars Magne Ingebrigtsen2013-08-12 15:54:45 +0200
commit8a44a184685092e2f39c9355467defde0b8b030c (patch)
treeb5ecedafe78e402b50b0d9a1494477935789e07b /lisp
parent594a430782d12499543637915fd974483523f500 (diff)
downloademacs-8a44a184685092e2f39c9355467defde0b8b030c.tar.gz
emacs-8a44a184685092e2f39c9355467defde0b8b030c.zip
Add the zlib prefix to `decompress-gzipped-region'
Diffstat (limited to 'lisp')
-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 @@
12013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * url-http.el (url-handle-content-transfer-encoding): Renamed
4 `zlib-decompress-gzipped-region' and check whether it's available,
5 too.
6
12013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org> 72013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 8
3 * url-vars.el (url-mime-encoding-string): If we have built-in gzip 9 * 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."
860(defun url-handle-content-transfer-encoding () 860(defun url-handle-content-transfer-encoding ()
861 (let ((encoding (mail-fetch-field "content-encoding"))) 861 (let ((encoding (mail-fetch-field "content-encoding")))
862 (when (and encoding 862 (when (and encoding
863 (fboundp 'decompress-gzipped-region) 863 (fboundp 'zlib-decompress-gzipped-region)
864 (zlib-available-p)
864 (equal (downcase encoding) "gzip")) 865 (equal (downcase encoding) "gzip"))
865 (save-restriction 866 (save-restriction
866 (widen) 867 (widen)
867 (goto-char (point-min)) 868 (goto-char (point-min))
868 (when (search-forward "\n\n") 869 (when (search-forward "\n\n")
869 (decompress-gzipped-region (point) (point-max))))))) 870 (zlib-decompress-gzipped-region (point) (point-max)))))))
870 871
871;; Miscellaneous 872;; Miscellaneous
872(defun url-http-activate-callback () 873(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.")
210 210
211(defvar url-request-method nil "The method to use for the next request.") 211(defvar url-request-method nil "The method to use for the next request.")
212 212
213(defvar url-mime-encoding-string (and (fboundp 'decompress-gzipped-region) 213(defvar url-mime-encoding-string (and (fboundp 'zlib-decompress-gzipped-region)
214 "gzip") 214 "gzip")
215 "String to send in the Accept-encoding: field in HTTP requests.") 215 "String to send in the Accept-encoding: field in HTTP requests.")
216 216