unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18007: 24.3.92: eww-download-callback, patch included
@ 2014-07-12 21:30 Charles Rendleman
  2014-07-13  8:09 ` Andreas Schwab
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Charles Rendleman @ 2014-07-12 21:30 UTC (permalink / raw)
  To: 18007

Originally filed incorrectly under Emacs 23; this bug is with the
24.3.92 pretest

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)





^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-11-10 20:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-12 21:30 bug#18007: 24.3.92: eww-download-callback, patch included Charles Rendleman
2014-07-13  8:09 ` Andreas Schwab
2014-11-04 16:39 ` Ted Zlatanov
2014-11-10 20:56   ` Lars Magne Ingebrigtsen
2014-11-05 16:55 ` bug#18007: 24.3.92: eww-download-callback, better " Kentaro NAKAZAWA
2014-11-10 20:56 ` bug#18007: 24.3.92: eww-download-callback, " Lars Magne Ingebrigtsen

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).