From df87fc30e19588e6c5811ab2dd02c7fd046a8e88 Mon Sep 17 00:00:00 2001 From: Charles Rendleman Date: Mon, 10 Nov 2014 21:55:55 +0100 Subject: [PATCH] (eww-download-callback): Save only the file contents * net/eww.el (eww-download-callback): Save only the file contents, not the headers. --- lisp/ChangeLog | 5 +++++ lisp/net/eww.el | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1eb7ca9cb2e..7cd867dd7da 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-11-10 Charles Rendleman (tiny change) + + * net/eww.el (eww-download-callback): Save only the file contents, + not the headers. + 2014-11-10 Lars Magne Ingebrigtsen * 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." (path (car (url-path-and-query obj))) (file (eww-make-unique-file-name (file-name-nondirectory path) eww-download-directory))) - (write-file file) + (goto-char (point-min)) + (re-search-forward "\r?\n\r?\n") + (write-region (point) (point-max) file) (message "Saved %s" file)))) (defun eww-make-unique-file-name (file directory) -- 2.11.4.GIT