[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/with-url 94b1d02 3/7: Decompress compressed data
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] scratch/with-url 94b1d02 3/7: Decompress compressed data |
Date: |
Sat, 21 Jan 2017 23:08:22 +0000 (UTC) |
branch: scratch/with-url
commit 94b1d02d1761326d03df6e0643c405ba62e415b6
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Decompress compressed data
---
lisp/url/with-url.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lisp/url/with-url.el b/lisp/url/with-url.el
index dbd95d5..91414bf 100644
--- a/lisp/url/with-url.el
+++ b/lisp/url/with-url.el
@@ -499,6 +499,11 @@ If given, return the value in BUFFER instead."
;; remove the chunk length indicators from the response.
(when (cl-equalp (url-header 'transfer-encoding) "chunked")
(with-url--decode-chunked))
+ ;; The contents may be compressed.
+ (when (and (cl-equalp (url-header 'content-encoding) "gzip")
+ (fboundp 'zlib-available-p)
+ (zlib-available-p))
+ (zlib-decompress-region (point-min) (point-max)))
;; Text responses should have the CRLF things removed.
(when (string-match "^text/" (or (url-header 'content-type)
"text/html"))
- [Emacs-diffs] scratch/with-url updated (7355274 -> f74e07b), Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url b4ee883 4/7: Get the HTML redirect right (for duck duck go)., Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url 954aecf 2/7: Actually send over the HTTP headers, Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url f74e07b 7/7: Get the "peer closes connection first" case right, Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url e331a03 6/7: Remove debugging, Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url 94b1d02 3/7: Decompress compressed data,
Lars Ingebrigtsen <=
- [Emacs-diffs] scratch/with-url 2ca3815 1/7: Convert to with-url, Lars Ingebrigtsen, 2017/01/21
- [Emacs-diffs] scratch/with-url 41f9cda 5/7: Allow a global debugging switch for easier debugging, Lars Ingebrigtsen, 2017/01/21