all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#17914: 23.3;92: eww-download-callback
@ 2014-07-03 15:41 Charles Rendleman
  0 siblings, 0 replies; only message in thread
From: Charles Rendleman @ 2014-07-03 15:41 UTC (permalink / raw)
  To: 17914

[-- Attachment #1: Type: text/plain, Size: 691 bytes --]

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)

[-- Attachment #2: Type: text/html, Size: 916 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-03 15:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-03 15:41 bug#17914: 23.3;92: eww-download-callback Charles Rendleman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.