Re: Handling sites that don't send content-type (was: lynx word bleeding?)

Thomas Dickey <[email protected]>
Newsgroups gmane.comp.web.lynx.devel
Message-ID <[email protected]>
On Wed, Feb 09, 2022 at 07:34:26PM -0500, Karen Lewellen wrote:
> Chime,
> I am talking about the lynx build here.
> As Luke noted the lynx.cfg file is quite large and extensive, meaning your
> personal lynx.cfg file which is not the same as the lynx.cfg file for all
> shellworld users  is likely to  have differences.
> Additionally,   as I understand it, the feature cannot be saved in the
> options menu.  No idea where you are making the change, but my personal test

In lynx.cfg:

.h2 PREFERRED_CONTENT_TYPE
# When doing a GET, lynx expects the server to provide a Content-Type, i.e.,
# the MIME name which tells it how to present data.  When that is missing
# lynx uses this value.
#PREFERRED_CONTENT_TYPE: text/plain

loads the program variable LYContentType, which appears in the options
menu:

    /* Preferred content type: SELECT */
    PutLabel(fp0, gettext("Preferred content type"), preferred_content_string);
    BeginSelect(fp0, preferred_content_string);
    PutOptValues(fp0, LYContentType, content_values);
    EndSelect(fp0);

and also is listed in LYrcFile.c:

    MAYBE_ENU(RC_PREFERRED_CONTENT_TYPE, LYContentType,     tbl_preferred_content,
	      MSG_ENABLE_LYNXRC),

which says that the "ENABLE_LYNXRC" feature applies to this:

https://lynx.invisible-island.net/lynx_help/body.html#ENABLE_LYNXRC

though I overlooked adding that to the comment-block in lynx.cfg,
when I added it to the source-code in March 2018:

2018-03-21 (2.8.9dev.17)
* add PREFERRED_CONTENT_TYPE defaulting to text/plain and options-menu to
  replace an assumption in HTMIMEConvert that everything is text/html.
  Since most servers provide a valid Content-Type for HTML, and are more likely
  to omit it for files lacking a known suffix, defaulting to text/plain is a
  better choice -TD

This (in your lynx.cfg) should allow that to be saved from the options
menu, into ~/.lynxrc:

ENABLE_LYNXRC:PREFERRED_CONTENT_TYPE

> involves logging into shellworld itself with my own account, and using the
> services here, not an alias.  Did you log out entirely from your setup
> before trying again?
> 
> Karen
> 
> 
> 
> On Wed, 9 Feb 2022, Chime Hart wrote:
> 
> > Well, Karen, I was about to think you were correct. I tried switching an
> > option in my LYNX to html, exited, and went back to that site, no
> > changeThanks
> > Chime
> > 
> > 
> > 
> 

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net
ftp://ftp.invisible-island.net
signature.asc (application/pgp-signature, 659 B)
-----BEGIN PGP SIGNATURE-----

iQGzBAABCgAdFiEEGYgtkt2kxADCLA1WzCr0RyFnvgMFAmIEY1cACgkQzCr0RyFn
vgN2wAwAkpfUO1FQHLvGq7WkwOWy+yIfn807tCA7f5KW0zcv1wksx45N5gvXOz+G
Fppj9qoj1xKJmWQOaw4Kp112y0xeXR3hZbVH+OA1jw/jxGz2OEN+ZHmlGNz2Pe1e
I+Jzk7BLu548wkOWiz5mVrzgZZbljPTubXBaps4bESwMRWyEe9Zhq1xoN9+LK5TX
KmPXE15PbKl7CVODPVU2PLUXcODiv+Oi3fT6JWpkdUL0+J586QG4tN0WXvVXGJv6
Bv63xRllW9bBUvLf7bfenxBraszyAl0MONd6UxDdfLsTYXFTMU9M1qFXX7XpkNZF
h/1hQp4I+OxmvHgeHPT4XhkU83XHsALvS1b3ixrwrRHXaBImbsNfEnf9JiEhRoSw
Rx9CIiF562BumiSsGhCXthMt83ioeGdAuAhgYx43aa1e2NoDbFMUdovIadFBOohi
c0+T/2ye5hSSByZRdP+2FjY7LHg8kva4KuRip4RGuBEHX+CjaGBza+Xt4CclLIQf
U7V/gmGw
=3YqC
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.