bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18007: 24.3.92: eww-download-callback, patch included


From: Ted Zlatanov
Subject: bug#18007: 24.3.92: eww-download-callback, patch included
Date: Tue, 04 Nov 2014 11:39:04 -0500
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

On Sat, 12 Jul 2014 17:30:43 -0400 Charles Rendleman <carendle@gmail.com> 
wrote: 

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

CR> eww-download-callback should remove the HTTP header before saving the file
CR> after a download.

CR> diff --git a/lisp/net/eww.el b/lisp/net/eww.el
CR> index 02fc575..cff85a5 100644
CR> --- a/lisp/net/eww.el
CR> +++ b/lisp/net/eww.el
CR> @@ -1075,7 +1075,9 @@ Differences in #targets are ignored."
CR>             (path (car (url-path-and-query obj)))
CR>             (file (eww-make-unique-file-name (file-name-nondirectory path)
CR>                                             eww-download-directory)))
CR> -      (write-file file)
CR> +      (goto-char 0)
CR> +      (re-search-forward "\r?\n\r?\n")
CR> +      (write-region (point) (point-max) file)
CR>        (message "Saved %s" file))))

CR>  (defun eww-make-unique-file-name (file directory)

Would that work correctly with all encodings?  Multipart?  Binary data?

Is there a better way to extract the data in the url library?

Thanks
Ted





reply via email to

[Prev in Thread] Current Thread [Next in Thread]