all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Iñigo Serna" <inigoserna@gmail.com>
To: 22333@debbugs.gnu.org
Subject: bug#22333: 24.5; EWW downloads invalid compressed tar-files
Date: Fri, 08 Jan 2016 22:23:27 +0100	[thread overview]
Message-ID: <8760z3zrxs.fsf@inigo.katxi.org> (raw)

Hello,

Browsing web using eww and downloading compressed tar-files
(f.e. filename.tar.gz) save invalid files (can't be uncompressed).

I've tested on emacs 24.5 official packages both in Fedora 23 (x86_64)
and ArchLinux (x86_64 and arm), running with "emacs -Q -nw".
Tried also on git master, but download fails with this message:

    error in process filter: Args out of range: #<buffer  *http pypi.python.org:443*>, 0, 13

To reproduce, browse to any web which offers any tar compressed file
and hit 'd' to download when cursor is over file URL. Then try to
uncompress it:

    /home/inigo/Downloads ⚡ tar xvf filename.tar.gz
    tar: This does not look like a tar archive
    tar: Skipping to next header
    tar: Exiting with failure status due to previous errors

I see `eww-download` calls `url-retrieve` to download the file
asynchronously, which stores the downloaded file in an emacs buffer and
then saves it.
I think the problem comes from the buffer saving action and not from eww
code, but I don't have enough skills to debug this.

Btw, using `url-copy-file` (which does not employ an intermediate emacs
buffer) works ok, so I use this code:

    (defun isr/eww-download ()
      "Alternative not asynchronous download."
      (interactive)
       (let ((url (get-text-property (point) 'shr-url)))
         (unless url
           (message "No URL under point"))
         (url-copy-file url (concat eww-download-directory "/" (file-name-nondirectory url)))
         (message "Saved %s" url)))

Thanks,
Iñigo Serna

PS: This is my first emacs bug report, excuse me if I've done something wrongly.

INFORMATION COPIED FROM report-emacs-bug:

Configured using:
 `configure --build=x86_64-redhat-linux-gnu
 --host=x86_64-redhat-linux-gnu --program-prefix=
 --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
 --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
 --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
 --libexecdir=/usr/libexec --localstatedir=/var
 --sharedstatedir=/var/lib --mandir=/usr/share/man
 --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
 --with-rsvg --with-tiff --with-xft --with-xpm --with-x-toolkit=gtk3
 --with-gpm=no build_alias=x86_64-redhat-linux-gnu
 host_alias=x86_64-redhat-linux-gnu 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g
 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
 -m64 -mtune=generic' LDFLAGS=-Wl,-z,relro'

Important settings:
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix





             reply	other threads:[~2016-01-08 21:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 21:23 Iñigo Serna [this message]
2016-01-09  6:50 ` bug#22333: 24.5; EWW downloads invalid compressed tar-files Eli Zaretskii
2016-01-09 10:02   ` Andreas Schwab
2016-01-09 11:26     ` Iñigo Serna
2016-02-04  4:59       ` Lars Ingebrigtsen
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=8760z3zrxs.fsf@inigo.katxi.org \
    --to=inigoserna@gmail.com \
    --cc=22333@debbugs.gnu.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.