From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Iñigo Serna" <inigoserna@gmail.com>
Cc: Andreas Schwab <schwab@linux-m68k.org>, 22333@debbugs.gnu.org
Subject: bug#22333: 24.5; EWW downloads invalid compressed tar-files
Date: Thu, 04 Feb 2016 15:59:12 +1100 [thread overview]
Message-ID: <8760y52hr3.fsf@gnus.org> (raw)
In-Reply-To: <87io3356z8.fsf@inigo.katxi.org> ("Iñigo Serna"'s message of "Sat, 09 Jan 2016 12:26:35 +0100")
Iñigo Serna <inigoserna@gmail.com> writes:
> `eww-download-callback` (called by `url-retrieve`) should remove those headers
> after download is finished and before buffer is saved to disk.
>
> A simple fix could be to add (excuse my poor elisp skills):
>
> (goto-char (point-min))
> (search-forward-regexp "^$")
> (forward-line)
> (delete-region (point-min) (point))
>
> before '(write-file file)' in `eww-download-callback`.
This function looks like this in emacs-25:
(defun eww-download-callback (status url)
(unless (plist-get status :error)
(let* ((obj (url-generic-parse-url url))
(path (car (url-path-and-query obj)))
(file (eww-make-unique-file-name
(eww-decode-url-file-name (file-name-nondirectory path))
eww-download-directory)))
(goto-char (point-min))
(re-search-forward "\r?\n\r?\n")
(write-region (point) (point-max) file)
(message "Saved %s" file))))
So it looks like this has already been fixed.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2016-02-04 4:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-08 21:23 bug#22333: 24.5; EWW downloads invalid compressed tar-files Iñigo Serna
2016-01-09 6:50 ` Eli Zaretskii
2016-01-09 10:02 ` Andreas Schwab
2016-01-09 11:26 ` Iñigo Serna
2016-02-04 4:59 ` Lars Ingebrigtsen [this message]
2016-02-04 5:06 ` Lars Ingebrigtsen
2016-02-06 17:28 ` Iñigo Serna
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8760y52hr3.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=22333@debbugs.gnu.org \
--cc=inigoserna@gmail.com \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.