[Top][All Lists]

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

lynx-dev bzip2 compressed files (was Re: NLS tweaks for 282dev4)

From: Klaus Weide
Subject: lynx-dev bzip2 compressed files (was Re: NLS tweaks for 282dev4)
Date: Fri, 20 Nov 1998 09:04:50 -0600 (CST)

On Fri, 20 Nov 1998, Nelson Henry Eric wrote:

> > > Changing the subject, I cannot get my mailcap/mime.types entry to
> > > work for bzip2-compressed files.  Precisely, I cannot get Lynx to
> > > use bzip2 -d to decompress the file, and then pass the result to
> > > most for display.  Works fine when I have it gzipped.
> > >
> > > Does anyone have working mailcap/mime.types entries, or lynx.cfg
> > > VIEWER/SUFFIX entries, for decompressing bzip2 files and passing the
> > > decompressed stream to a reader like most, or even to lynx?
> It's not just served files, but also files on the localhost that I'm
> interested in.  But to give an example, my own http server gives the
> following header (analogous to what I have for gzip), but admittedly
> I'm pretty stupid when it comes to knowing about headers and such.
> HTTP/1.0 200 Document follows
> Date: Fri, 20 Nov 1998 04:42:59 GMT
> Server: NCSA/1.5.2
> Last-modified: Fri, 20 Nov 1998 04:38:36 GMT
> Content-type: text/plain
> Content-length: 20989
> Content-encoding: bzip2
> This is for the latest update to the ja.po I did this lunch hour:
>  <>.
>      My mime.types entries are:
> application/bzip2                 bz2
> application/x-bzip2               bz2
>      and my mailcap entries are:
> application/bzip2; /usr/local/bin/bzip2 -d %s
> application/x-bzip2; /usr/local/bin/bzip2 -d %s

Nothing you set in your mailcap file will feed the data back to lynx
for rendering.  Lynx just invokes the command given, and that's it.
It just has always been that way. :)

Files compressed with gzip and compress work differently, but only
because lynx has special code to handle them; and that is not
controlled by a mailcap file.

The pseudo MIME types "application/bzip2" (and similar) are only
used at all if the internal code has decided that it cannot handle
the given compression encoding.  It is like Lynx saying "I cannot
handle this, but maybe you have some viewer for it".  For a file
which Lynx *can* handle internally, like
   Content-type: text/plain
   Content-encoding: gzip
or a local xyz.txt.gz file, pseudo MIME types "application/gzip" 
or "application/x-gzip" never enter into it at all. 

Lynx could only work for .bz2 files the same way as it does now for
.Z and .gz if equivalent code were added to handle the decompression.

If you just want your bzipped file displayed by most,

   application/bzip2; /usr/local/bin/bzip2 -d %s | most

should do it.


reply via email to

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