lynx-dev
[Top][All Lists]
Advanced

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

Re: [Lynx-dev] An error with temporary file


From: Bela Lubkin
Subject: Re: [Lynx-dev] An error with temporary file
Date: Sat, 27 Jan 2024 23:42:01 -0800

Riku Virtanen wrote:

> Data transfer complete
> /usr/bin/brotli -j -d /tmp/lynxXXXX6fQBBD/L1617-7134TMP.html.br
> Alert!: Error uncompressing temporary file!

I tried to reproduce this.  Had to custom-build Lynx with `./configure
--without-brotli`, otherwise it used library code rather than the
external utility.  With the custom build, it did use the external
utility (so '--without-brotli' really means '--without-brotli-lib').

And then `lynx -trace https://www.tripadvisor.comm` just worked.  The
external utility successfully decoded the file.  It was clear in my
trace that Lynx & tripadvisor *did* decide Brotli was the best format to
exchange, and Lynx *did* invoke the external utility, and it succeeded.

Lynx is partly at fault in your situation, for emitting a cruddy error
message like 'Alert!: Error uncompressing temporary file!'.  This
message should be much more specific: did exec() fail?  (If so, with
what errno?)  Did it work but the exec'd program exited with an error
code?  Error message?  Empty output?  Undecipherable output?  I'm sure
it has a narrower meaning we could deduce from the Lynx source, but we
shouldn't have to; certainly the *next* person with this problem
shouldn't have to...

Anyway.  You can make a fake-brotli to save the file:

=====cut=====
#!/bin/sh

case $3 in *.br)
    cp -p $3 $3.save;;
esac
exec /usr/bin/brotli "$@"
=====cut=====

Add:

    BROTLI_PATH:/path/to/fake/brotli

to your lynx.cfg, then run `lynx -trace https://www.tripadvisor.com/`
again.  Thus collecting a copy of whatever.br as was received by Lynx.

Confirm in the trace output that it actually ran your fake-brotli; then
go look for $3.save -- is it a valid Brotli format file?  Is it empty?
Is it an uncompressed HTML file which is spuriously being served to your
browser as Brotli-compressed?

[ Don't forget to remove BROTLI_PATH from lynx.cfg.  BTW, is there a
Lynx flag like '--cfg_line=BROTLI_PATH:/path/to/fake/brotli'? ]

>Bela<



reply via email to

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