aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2013-08-12 19:02:31 +0200
committerLars Magne Ingebrigtsen2013-08-12 19:02:31 +0200
commit7699d09ec6f13ec0b864e82a8c59e56037628539 (patch)
treefa5d8707c5d41a71b16642e2dbf35010fd009092 /lisp
parent1d238bc75ac833eb28a72f24cc1acd79ec5999d7 (diff)
downloademacs-7699d09ec6f13ec0b864e82a8c59e56037628539.tar.gz
emacs-7699d09ec6f13ec0b864e82a8c59e56037628539.zip
Rename `zlib-decompress-gzipped-region' to `zlib-decompress-region'.
Also support zlib-format compression.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/url/ChangeLog2
-rw-r--r--lisp/url/url-http.el4
-rw-r--r--lisp/url/url-vars.el3
3 files changed, 6 insertions, 3 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 7ac445e03c1..2346803c6bf 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -3,6 +3,8 @@
3 * url-http.el (url-handle-content-transfer-encoding): Renamed 3 * url-http.el (url-handle-content-transfer-encoding): Renamed
4 `zlib-decompress-gzipped-region' and check whether it's available, 4 `zlib-decompress-gzipped-region' and check whether it's available,
5 too. 5 too.
6 (url-handle-content-transfer-encoding): Renamed
7 `zlib-decompress-region' again.
6 8
72013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org> 92013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
8 10
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 9eab1a6f683..07049591cf0 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -860,14 +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 'zlib-decompress-gzipped-region) 863 (fboundp 'zlib-decompress-region)
864 (zlib-available-p) 864 (zlib-available-p)
865 (equal (downcase encoding) "gzip")) 865 (equal (downcase encoding) "gzip"))
866 (save-restriction 866 (save-restriction
867 (widen) 867 (widen)
868 (goto-char (point-min)) 868 (goto-char (point-min))
869 (when (search-forward "\n\n") 869 (when (search-forward "\n\n")
870 (zlib-decompress-gzipped-region (point) (point-max))))))) 870 (zlib-decompress-region (point) (point-max)))))))
871 871
872;; Miscellaneous 872;; Miscellaneous
873(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 786b5533bf8..0361e01dfb4 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -210,7 +210,8 @@ 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 'zlib-decompress-gzipped-region) 213(defvar url-mime-encoding-string (and (fboundp 'zlib-decompress-region)
214 (zlib-available-p)
214 "gzip") 215 "gzip")
215 "String to send in the Accept-encoding: field in HTTP requests.") 216 "String to send in the Accept-encoding: field in HTTP requests.")
216 217