GNU bug report logs - #17914
23.3;92: eww-download-callback

Previous Next

Package: emacs;

Reported by: Charles Rendleman <carendle <at> gmail.com>

Date: Thu, 3 Jul 2014 15:42:02 UTC

Severity: normal

Tags: fixed

Merged with 18007

Found in version 24.3.92

Fixed in version 25.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Charles Rendleman <carendle <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.3;92: eww-download-callback
Date: Thu, 3 Jul 2014 11:41:08 -0400
[Message part 1 (text/plain, inline)]
eww-download-callback should remove the HTTP header before saving the file
after a download.

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 02fc575..cff85a5 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1075,7 +1075,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 0)
+      (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)
[Message part 2 (text/html, inline)]

This bug report was last modified 10 years and 197 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.