[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lynx-dev] lynx does not check charset on reload
From: |
Thomas Dickey |
Subject: |
Re: [Lynx-dev] lynx does not check charset on reload |
Date: |
Thu, 02 Feb 2012 20:58:32 -0500 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Tue, Jan 03, 2012 at 04:51:05PM +0100, Stanislav Brabec wrote:
> Thomas Dickey wrote in Tue Dec 20, 2011 at 20:21 -0500:
> > On Tue, Dec 20, 2011 at 06:14:25PM +0100, Stanislav Brabec wrote:
> > > Thomas Dickey wrote:
> > > > On Mon, Dec 19, 2011 at 04:20:26PM +0100, Stanislav Brabec wrote:
> > > > > Hallo.
> > > > >
> > > > > lynx-2.8.7 (rel. 2) does not check charset header for changes on
> > > > > reload.
> > > > >
> > > > > It causes page corruption in following situation:
> > > > >
> > > > > 1. Enter URL.
> > > > > 2. Server has problems and returns an error message with a dumb
> > > > > charset
> > > > > (ASCII, ISO-8859-1).
> > > > > 3. Reload page.
> > > > > 4. Server returns correct page that has a different charset than the
> > > > > previous error message (e. g. UTF-8).
> > > >
> > > > I see... Is this something that's easy to reproduce with a particular
> > > > server? (If not, I'll have to set something up to be sure I'm fixing
> > > > the right thing).
> > >
> > > No. The server where it occurred presents errors rarely. If you send a
> > > patch, I guess I will be able to confirm the fix in a week or so.
> > >
> > > You can change configuration of your server between reloads, or you can
> > > use apache MultiView feature and rename file from .iso8859-1 to .utf8.
> >
> > well, _here_, I can see half of the problem. If I change the default
> > charset on the server and restart it between reloads, lynx switches
> > from ISO-8859-1 to UTF-8, but doesn't go the other way. That might
> > be the same issue as your report. I can take a closer look once I've
> > got my current xterm patch complete this week.
> >
> Today I have seen the error on affected server again.
> Error message "IIS 7.0 Detailed Error - 503.4 - Service Unavailable" had
> charset utf-8. Valid contents on reload had charset windows-1250.
>
> So I can fix the reproducer above:
> before reload: utf-8 (error message)
> after reload: windows-1250 (corrupted valid contents)
This seems to fix the problem
--- HTAccess.c 2011/05/24 09:35:29 1.74
+++ HTAccess.c 2012/02/03 01:43:58 1.75
@@ -1,5 +1,5 @@
/*
- * $LynxId: HTAccess.c,v 1.73 2010/10/03 22:49:46 tom Exp $
+ * $LynxId: HTAccess.c,v 1.74 2011/05/24 09:35:29 tom Exp $
*
* Access Manager HTAccess.c
* ==============
@@ -687,6 +687,11 @@
HTProtocol *p;
int status = get_physical(addr, anchor);
+ if (reloading) {
+ FREE(anchor->charset);
+ FREE(anchor->UCStages);
+ }
+
if (status == HT_FORBIDDEN) {
/* prevent crash if telnet or similar was forbidden by rule. - kw */
LYFixCursesOn("show alert:");
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Lynx-dev] lynx does not check charset on reload,
Thomas Dickey <=