* Fixed problem with charset handling for SOURCE_CACHE:MEMORY - if the charset
was specified by Content-Type http header it won't be lost (as it was) when
reparsing from source cache (applies to toggling DTD, switching to srcview,
and other stuff like *,' etc).
* SOURCE_CACHE:MEMORY in lynx.cfg was not understood by dev23
(SOURCE_CACHE:MEM was the way to say that). Now SOURCE_CACHE:MEMORY and
SOURCE_CACHE:MEM are synonims - this allows the use of lynx.cfg written for
lynx up to at least dev14 without rewriting.
Notes:
1) Why option value MEMORY was renamed to MEM? I don't think we should
abbreviate option values that much (then 'M' would be enough).
2) As for SOURCE_CACHE:MEMORY charset loss problem - I copied the piece of
code from the SOURCE_CACHE:FILE branch and everything seems to work fine
now (switching to src view and back in particular).
3) I played with dev23 and its SOURCE_CACHE and I think it's wrong in at
least one place - if I press '\' and document is expired when I did that,
then new content will be fetched from the net and I will see the source of
completely different document. I also dislike very much the fact that source
cache is cleared when the document expires - if user changes DTD or
presses '*' or @ or something like that on the document that expired, new
content will be fetched - IMO this is somewhat illogical (user wished to
change rendering, probably of the current document), though opposite
opinion (that it's correct) can be considered correct too from other POVs.
IMO this should be discussed.
Best regards
-Vlad
diff -ru lynx2-8-3-was/src/GridText.c lynx2-8-3/src/GridText.c
--- lynx2-8-3-was/src/GridText.c Mon Mar 27 08:14:00 2000
+++ lynx2-8-3/src/GridText.c Fri Mar 31 12:28:36 2000
@@ -8365,6 +8365,9 @@
FREE(HTMainAnchor->UCStages);
}
+ if (HTMainAnchor->content_type) {
+ format = HTAtom_for(HTMainAnchor->content_type);
+ } else {
/*
* This is only done to make things aligned with SOURCE_CACHE_NONE and
* SOURCE_CACHE_FILE when switching to source mode since the original
@@ -8373,8 +8376,9 @@
* user-visible benefits, seems just '=' Info Page will show source's
* effective charset as "(assumed)".
*/
- format = HTCharsetFormat(format, HTMainAnchor,
- UCLYhndl_for_unspec);
+ format = HTCharsetFormat(format, HTMainAnchor,
+ UCLYhndl_for_unspec);
+ };
/* not UCLYhndl_HTFile_for_unspec - we are talking about remote documents... */
if (HText_HaveUserChangedForms()) {
diff -ru lynx2-8-3-was/src/LYReadCFG.c lynx2-8-3/src/LYReadCFG.c
--- lynx2-8-3-was/src/LYReadCFG.c Mon Mar 27 08:14:00 2000
+++ lynx2-8-3/src/LYReadCFG.c Fri Mar 31 13:05:08 2000
@@ -948,6 +948,7 @@
static Config_Enum table[] = {
{ "FILE", SOURCE_CACHE_FILE },
{ "MEM", SOURCE_CACHE_MEMORY },
+ { "MEMORY", SOURCE_CACHE_MEMORY },
{ "NONE", SOURCE_CACHE_NONE },
{ NULL, SOURCE_CACHE_NONE },
};