aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCharles Rendleman2014-11-10 21:55:55 +0100
committerLars Magne Ingebrigtsen2014-11-10 21:55:55 +0100
commitdf87fc30e19588e6c5811ab2dd02c7fd046a8e88 (patch)
tree1a6cdef40b3584f02c6ba848991bd1a474097b83
parent6019446af60a8a4a7abe63b38791c3d738f7a44e (diff)
downloademacs-df87fc30e19588e6c5811ab2dd02c7fd046a8e88.tar.gz
emacs-df87fc30e19588e6c5811ab2dd02c7fd046a8e88.zip
(eww-download-callback): Save only the file contents
* net/eww.el (eww-download-callback): Save only the file contents, not the headers.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/net/eww.el4
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1eb7ca9cb2e..7cd867dd7da 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-11-10 Charles Rendleman <carendle@gmail.com> (tiny change)
2
3 * net/eww.el (eww-download-callback): Save only the file contents,
4 not the headers.
5
12014-11-10 Lars Magne Ingebrigtsen <larsi@gnus.org> 62014-11-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 7
3 * net/eww.el (eww-data): New plist to store all the data relevant 8 * net/eww.el (eww-data): New plist to store all the data relevant
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 76fb0c8743f..f6ab07801c7 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1142,7 +1142,9 @@ Differences in #targets are ignored."
1142 (path (car (url-path-and-query obj))) 1142 (path (car (url-path-and-query obj)))
1143 (file (eww-make-unique-file-name (file-name-nondirectory path) 1143 (file (eww-make-unique-file-name (file-name-nondirectory path)
1144 eww-download-directory))) 1144 eww-download-directory)))
1145 (write-file file) 1145 (goto-char (point-min))
1146 (re-search-forward "\r?\n\r?\n")
1147 (write-region (point) (point-max) file)
1146 (message "Saved %s" file)))) 1148 (message "Saved %s" file))))
1147 1149
1148(defun eww-make-unique-file-name (file directory) 1150(defun eww-make-unique-file-name (file directory)