[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev dev.20 patch 1 - error page 'z'ap
From: |
Klaus Weide |
Subject: |
lynx-dev dev.20 patch 1 - error page 'z'ap |
Date: |
Tue, 23 Mar 1999 15:27:57 -0600 (CST) |
This small patch removes an annoyance: I often go offline while
having lynx running, and expect to be able to continue navigating among
the documents already loaded (cached). Sometimes I follow the wrong
link, to a document that isn't loaded. I'm using a proxy (on localhost),
so lynx connects to proxy (which doesn't have the doc either), gets a
500 (or similar) error response, shows alert. I don't want to see the
500 page (I know what it will say), so I press 'z' during the alert
pause. Lynx should then skip up any attempt to proceed with loading
the page, but (without this patch) it doesn't detect the 'z' early
enough. The result is that the page may be loaded but not displayed,
pushing another doument out of lynx's cache. That the error page
has actually been loaded, although it doesn't appear so, can be
seen by following the link a second time: the now-cached error page
appears immediately.
Klaus
* Check for 'z' user interrupt in HTLoadHTTP before setting up the
output stream. This avoids doing unnecessary work, including
possible creation of a new HText structure that most likely is
never displayed but still pushes another document out of the.
cache. Most commonly this occurs when a HTTP error response is
received and the user presses 'z' while the resulting alert message
is shown.
--- lynx2-8-2.old/WWW/Library/Implementation/HTTP.c Wed Mar 17 21:17:10 1999
+++ lynx2-8-2/WWW/Library/Implementation/HTTP.c Tue Mar 23 14:59:07 1999
@@ -1687,6 +1687,20 @@
} /* scope of fields */
/*
+ ** The user may have pressed the 'z'ap key during the pause caused
+ ** by one of the HTAlerts above if the server reported an error,
+ ** to skip loading of the error response page. Checking here before
+ ** setting up the stream stack and feeding it data avoids doing
+ ** unnecessary work, it also can avoid unnecessarily pushing a
+ ** loaded document out of the cache to make room for the unwanted
+ ** error page. - kw
+ */
+ if (HTCheckForInterrupt()) {
+ HTTP_NETCLOSE(s, handle);
+ status = HT_INTERRUPTED;
+ goto clean_up;
+ }
+ /*
** Set up the stream stack to handle the body of the message.
*/
if (do_head || keep_mime_headers) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev dev.20 patch 1 - error page 'z'ap,
Klaus Weide <=