From: Charles Rendleman Date: Mon, 10 Nov 2014 20:55:55 +0000 (+0100) Subject: (eww-download-callback): Save only the file contents X-Git-Tag: emacs-25.0.90~2635^2~500 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=df87fc30e19588e6c5811ab2dd02c7fd046a8e88;p=emacs.git (eww-download-callback): Save only the file contents * net/eww.el (eww-download-callback): Save only the file contents, not the headers. --- 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)