lynx-dev
[Top][All Lists]
Advanced

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

Re: [Lynx-dev] Lynx seems to ignore file extensions with temp downloads


From: Thomas Dickey
Subject: Re: [Lynx-dev] Lynx seems to ignore file extensions with temp downloads on gopher protocol I types
Date: Mon, 20 Apr 2020 20:33:16 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Mon, Apr 20, 2020 at 10:13:20PM +0000, Wayne Werner via Lynx-dev wrote:
> I've been playing around with Gopher recently, which is an amazing
> protocol and I love that Lynx supports gopher!
> 
> But I discovered some weirdness. When there's an (I)mage listed and you
> simply hit enter -- over HTTP this would kick off my external image
> viewer -- but with gopher it looks like it always tries to treat
> (I)mages as (g)if. An example, if you go to `lynx
> gopher://rpod.leveck.us/` and hit enter on the PHOTO OF THE SERVERS
> image link, which is a jpg, it names the temp file .gif.

Looking at the source, the explanation seems to be this (for presenting
the image):

a) the gopher protocol doesn't give mime-type information (it just
   identifies that as an image).
   
   Lynx would like to use the mime-type and ignore the actual filename :-)

b) lynx maps any gopher-provided image to image/gif

   gifs were more common a while back :-)

c) that mapping leads to the suggested suffix for the xloadimage (viewer)
   command.

   The viewer looks at the file format anyway, and should ignore the suffix...

On the other hand, the download follows a different path, using just
the server's link filename, which ends in ".png".

> Downloading the image works fine, and it respects the filename.
> 
> My version info:
> 
> Lynx Version 2.8.9dev.16 (11 Jul 2017)
> libwww-FM 2.14, SSL-MM 1.4.1, GNUTLS 3.5.17, ncurses 6.1.20180127(wide)
> Built on linux-gnu.
> 
> Is this expected behavior, or am I running into a bug here?

The former, I think

-- 
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

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