HISTORY.TXT
(for DosLynx v0.35b, August 2007)
by Fred C. Macall
Introduction
In this document, I'll try to take up where I left off in the last
history.txt and not rehash the history of the previous versions.
However, there is a cumulative list of unresolved bugs, issues, and To Do(s)
at the end. If you want to know everything else there is to know about my
previous releases of DosLynx, you can get much of that history from:
http://users.ohiohills.com/fmacall/dlx2xdoc.zip .
That archive collects the info.htm and history.txt documents for all eight
of my DosLynx v0.2xb releases. For the rest, the documents for
DosLynx v0.30b through v0.34b are available at:
http://users.ohiohills.com/fmacall/dlx30/info.htm
http://users.ohiohills.com/fmacall/dlx30/history.txt
http://users.ohiohills.com/fmacall/dlx31/info.htm
http://users.ohiohills.com/fmacall/dlx31/history.txt
http://users.ohiohills.com/fmacall/dlx32/info.htm
http://users.ohiohills.com/fmacall/dlx32/history.txt
http://users.ohiohills.com/fmacall/dlx33/info.htm
http://users.ohiohills.com/fmacall/dlx33/history.txt
http://users.ohiohills.com/fmacall/dlx34/info.htm
and
http://users.ohiohills.com/fmacall/dlx34/history.txt .
In July, I extended or enhanced DosLynx: To support nine new Unicode
character entities. To provide limited support for UTF-8 document encoding.
And, to support (anti)caching directives, in HTTP Headers and in
HTML , and
Cache-Control: no-cache (but not no-cache= . . . ) or
Cache-Control: max-age=0 . And, HTML
Headers.
Recognizing the (anti)caching directives starts out much as in recognizing
the charset=UTF-8 designation. First, a declaration for extern int nocache
has been added to GLOBALS.H. nocache gets instantiated in GLOBALS.CPP.
And, initialized to zero early in TURLView::TURLView( ), in TURLVIE2.CPP.
Early in HTLoadHTTP( ), in HTTP.C, nocache gets set to one. If a status
code of 200, 203, 300, 301, or 410 gets decoded later, nocache gets cleared
back to zero. As results of this arrangement, code 300 and 301 redirects
(from HTTP) to, say, FTP will end with nocache clear. Any other redirect(s)
to FTP will end with nocache set. While redirects that stay with HTTP will
end with nocache set in accord with the last status code obtained.
We'll watch to try to see if these results need any modification.
Next, HTMIME_put_character( ) in HTMIME.C, has been extended to recognize
Cache-Control: . . . , Expires: . . . , and Pragma: . . . response Header
lines. States CEE, CACHE_CONTROL, EXPIRES, and PRAGMA have been added to
typedef enum _MIME_state { . . . } MIME_state for this. Pragma: Header
lines get handled by a new case PRAGMA, in case GET_VALUE in
HTMIME_put_character( ). Essentially, this is a case insensitive check for
the string no-cache . A match gets noted in the nocache global variable.
Cache-Control: and Expires: Header lines get handled mostly in common with
Set-Cookie: Header lines. Once Cache-Control: or Expires: has been
recognized, the remainder of one of these Header lines gets accumulated in
a string located by a new PRIVATE char * cpcctrl or PRIVATE char * cpexpire
variable.
A new if (cpcctrl) clause, in case NEWLINE in HTMIME_put_character( )
begins by eliminating all of the string's white space character(s).
Then, on the basis of any comma separator(s) possibly present, it uses case
insensitive compares to check each of the string's field(s) for no-cache or
max-age=0 . Any match gets noted in the nocache global variable.
Afterwards, cpcctrl's string gets free(d) and cpcctrl gets cleared.
Expires: response Header line handling is much like
Set-Cookie: Expires= . . . response Header attribute field handling.
So, I've extracted the code for that from readcky( ), in CKIESRCV.CPP.
And, placed it in new function extern "C" int chkdtim(const char * cpdtim),
in new module CHKDTIM.CPP. readcky( ) and CKIESRCV.CPP were introduced in
the history.txt document for DosLynx v0.34b.
chkdtim( ) returns: A negative value for a date/time string value in the
past. Zero for an unrecognizable date/time string. And, a positive value
for a date/time string value in the future. The extracted code has been
replaced with an if (chkdtim( . . . clause, in readcky( ).
The following new clause, in case NEWLINE in HTMIME_put_character( ),
serves Expires: response Header lines:
/* If have an Expires: Header line parsed, see about setting the no caching
/* indicator.
*/
if (cpexpire)
{
/* If the Expires: Date/TIMe field value is unrecognizable or past,
/* don't cache the document in process.
*/
if (chkdtim(cpexpire) <= 0)
nocache |= 4 ;
free(cpexpire) ;
cpexpire = 0 ;
}
As with cpchars strings, cpcctrl and cpexpire strings also get cleaned up
and cleared in HTMIMEConvert( ), when necessary.
Two more big new if ( . . . ) clauses, in case HTML_META in
HTML_start_element( ) in HTML.C, provide the same kind of recognition and
nocache updating for no-cache appearing in an
HTML