CHANGE LOG for gn package
=========================

CHANGES from version 2.15 to 2.16 (10/17/94)
-------------------------------------------
Fixed bug in chkcache.c that set wrong method in cgi scripts.
(reported by Kurt Siegl).

Put "#define" BSD line back in config.h for OS BSD_386.  With it
there is a BSD redefined warning, but without it there are other
problems.

CHANGES from version 2.15 to 2.16 (10/12/94)
-------------------------------------------
Added support for exec and CGI envirionment variable HTTP_AUTHORIZTION
This variable contains the contents of the Authorization: header sent
by an HTTP client. (thanks to Craig Milo Rogers).

Added support for setting the logfile in config.h.  You #define
GN_LOGFILE to the proper value.

Added support for an "exec7" type (thanks to Chip Rosenthal).

Fixed bug introduced in 2.15 which caused HTTP requests with "nice"
looking URLs (i.e. no gopher type in their path) to fail (thanks
to Chip Rosenthal again!)

CHANGES from version 2.14 to 2.15 (10/9/94)
-------------------------------------------
Added support for If-Modified-Since conditional GET for HTTP.
Mostly in new file mod.c some other files too.  This is used
by caching servers.

Fixed bug in safer_popen that caused failure on all metacharacters.
(thanks to Stephen Trier).

Fixed bug in www_err() which sometimes put garbage in log files.
(thanks to Stephen Trier).

Fixed bug in waign which caused problems with WWW-escaped characters
in file names (reported by L. Donahue).

Fixed bug in chop() function in mkcache/init.c.

Fixed problem with Pyramid having no strstr(). (Thanks to Earle Ake).

Improved docs: (1) an addition to gn(8) man page describing the format
of a .cache file. Thanks to David Capshaw. (2) Several mistakes in
Install.html fixed.  Thanks to David Begley.


CHANGES from version 2.13 to 2.14 (9/19/94)
-------------------------------------------
Enhanced the behavior of mkcache for structured files: If the
Section= regular expression starts with $ then the $ is skipped and
the remainder is used for the line AFTER the line matching the
Separator.  Thus with

Separator=^$
Section=$^

this means the separator is any blank line and the Section (i.e. title)
will be the entire line after the blank line.

Added logging of suspicious characters in script args.

Added support for setting a uid or gid (not both) for .cache files.
Thanks to A. Thew for this idea.  This is done with the "-k uid#" or
"-K gid#" option to gn or sgn.  When invoked in this way gn or sgn
will not serve a document unless the .cache file permitting it has the
prescribed owner or gid.  This uid# or gid# should be that of the
maintainer not the one under which gn or sgn runs.  Note that for the
.cache file in dir1 to be served the owner of the (different) .cache
file in the directory ABOVE it must be correct, not the owner of the
.cache in dir1 itself.  In particular, the top level .cache is always
allowed as it is not listed in any .cache file.  (Sometimes even I get
confused about this :)

Added "Date: " line to HTTP headers.  Made all header lines end with
CRLF as they should instead of just LF.

Added #define EXPLICIT_CACHE line to config.h. By default this is
commented out.  You must uncomment this if you want to use "explicit
caches" included parentheses in the path.  Of course, if you do then
you can't put parentheses in your pathnames.  (You shouldn't anyway).
I don't use this myself, because everything I would do with it I seem
to be able to accomplish without it.  I have thought a lot about the
security implications of this also.  I believe it is secure, but I am
more comfortable without it.  Having said that it this feature is
getting improved: (see next item)

Added code from Jurgen Botz to make explicit caches work with items
of type 0h and 1h.  Many thanks to Jurgen.

Moved #define ESCAPE_META line from config.h to util.c.  I have never
liked this.  It is still possible to use it.  Just uncomment it in
util.h. I don't want to advertise its presence in config.h though.

Added Judy Birmingham's document on setting up clickable images with
GN to the documentation directory.  Thanks Judy!


CHANGES from version 2.12 to 2.13 (9/2/94)
-------------------------------------------
Upgraded CGI support from CGI/1.0 to CGI/1.1.  Fixed CGI bug
which put a leading space on some environment variables (reported
by A. Pam).

Fixed bug that caused local references with Path=1/ (i.e. return
to root) to fail.  (reported by Jurgen Botz)

Logfile is now opened after user id has been changed from root.  This
is a security improvement affecting sgn, but it means that whatever
user id you set in config.h must have permission to write to the
logfile.

Added "(void) fflush(logfp);"  line suggested by Chip Rosenthal to
init.c avoid truncated log lines.

Added FORBID_EXEC #define to config.h and support in gn.c and chkcache.c
If this is uncommented no scripts (type "exec' or "CGI") will be allowed.
This is enhances security if e.g. untrusted users have write access to 
some part of your data directory.


CHANGES from version 2.11 to 2.12 (7/20/94)
-------------------------------------------
Fixed bug that caused telnet links to fail when used with HTTP clients
(fix provided by Chip Rosenthal).

Arranged for better errror message when file in non-existent directory
is requested (fix provided by Chip Rosenthal).

Made HTTP/1.0 rather than HTTP/0.9 the default.  The effect of this is
that clients which claim to be HTTP/V1.0 will now work properly.

CHANGES from version 2.10 to 2.11 (6/18/94)
-------------------------------------------
Fixed bug in chkcache.c which caused all items in a menu
after a URLlink= item to fail.  

CHANGES from version 2.09 to 2.10 (6/14/94)
-------------------------------------------
Fixed bug introduced in 2.09 which completely broke the
relative URL code introduced in 2.07.

Fixed bug in util.c which made it impossible to run gn from a tty
(for trouble shooting) when DO_LINGER was defined.

Added definition of bzero in config.h for SysV systems.


CHANGES from version 2.08 to 2.09 (6/10/94)
-------------------------------------------
Implemented URLlink= menu items in gn/sio.c and mkcache/mkcache.c
These work as follows: a menu item like

	URLlink=The change log for gn
	Url=http://hopf.math.nwu.edu/docs/CHANGES

will be served to all HTTP clients and invisible to gopher clients.
Any other fields (besided Url= ) will be ignored.

Fixed minor bug introduced in 2.08 which caused decoupling to 
break.  Also one that made a selector consisting of <tab>+ 
(which some gopher+ clients use for root) fail.

CHANGES from version 2.07 to 2.08 (6/8/94)
-------------------------------------------
Fixed bug in gn/sio.c which caused any item with Attribute=gnlink
to be treated as if it had Attribute=gopheronly
 
Fixed bug in waisgn which caused it to try to undo the 
WWW URL escapes in a  gopher path name (there shouldn't be any).
Thanks to Larry Donahue.

Added DO_LINGER patch from Chip Rosenthal.  If you have problems
with documents being truncated for remote requests then uncomment
the #define DO_LINGER in config.h (this is dones automatically for
systems that I have heard need it, e.g SCO and LINUX).

Changed the way gn processes requests to make relative URL references
in HTML documents work.  It also allows URL's which look like those of
httpd to work, i.e.

	http://hopf.math.nwu.edu/docs
works.  Details on how this works are in doc/technical.notes.




CHANGES from version 2.06 to 2.07 (4/20/94)
-------------------------------------------

Fixed bug in mkcache/mkcache.c and gn/sio.c which caused
Attribute=goppheronly not to work correctly for remote items.


CHANGES from version 2.05 to 2.06 (4/16/94)
-------------------------------------------

Fixed bug in gn/sio.c that caused HTTPText= items not to
be displayed if they occured in a menu immediately after an item
with attribute "invisible" or "gopheronly". 

Fixed bug in gn/csearch.c and gn/search.c so that search terms for 7c
and 7g now have %escapes decoded for HTTP clients.

Fixed bug in gn/csearch.c which caused 7c searches with search
term startin with '~' (indicating word boundary) to return a 
search term expression error.

Fixed bug in mkcache/mkcache.c which caused Attribute=GNlink in 
a menu item not to work.  This is now the preferred way to handle
these links rather than using GNlink= in place of Name= (though the
old way still works).

CHANGES from version 2.04 to 2.05 (4/15/94)
-------------------------------------------

Attributes:  >>GopherOnly and GNLink are now attributes. <<
(The old way of doing this in menu files is still supported
but discouraged.  However, the .cache files are incompatible
so you must run the new version of mkcache on any menu files
containing GopherOnly or GNLink items.  There is now a new
attribute, namely HTTPOnly which is like GopherOnly.  See
the new version of the installation guide.

Improved verification of the remote host name when access control is
being used.  Now gn gets the IP address, queries for the name
associated with that address, then queries the host with that name for
its IP address and compares with the first IP address.  This will
prevent some counterfeit hostname schemes.  This is not done (for
efficiency) if no access control is being used (i.e. if neither of the
options -A or -a is being used.)

Fixed mkcache so that if a menu item contains the line
"Type=h" the content-type is set to "text/html".  A 
ContentType= line still can override this, of course.

Also added a "-q" (for quiet) option to mkcache which prevents
printing of most console messages.  Really serious errors are
still reported.

Fixed waisgn so it works with the new freeWAIS (freeWAIS-0.3).
This is probably the best version of WAIS to use now.  If you
want to continue to use an older version of freeWAIS or IUBioWais
you will have to comment out the "#define FREEWAIS_03" line in 
waisgn/waisgn.h


CHANGES from version 2.03 to 2.04 (3/24/94)
------------------------------------------

Fixed bug that made requests for directories fail if there
was a trailing '/', i.e. gopher://host/1/docs/ failed when
gopher://host/1/docs worked.

Minor security strengthening. (This means I addressed what could
be a weakness, even though I can't think of a way to exploit the
weakness).

A request for 1/dir now suceeds if the path is 1s/dir.

Fixed bug in sio.c caused by string typo (".hmtl" instead of
".html"). (reported by Jose Marques).

CHANGES from version 2.02 to 2.03 (3/20/94)
------------------------------------------
Security improvements.  As of this version if any path to a file
is found containing a backslash '\' or /../ the occurence is
logged with the word SECURITY and the connection is closed with
no error sent to the client. Also there is now a maximum number
header lines accepted for HTTP and a maximum allowed size for
input with the post method.

Fixed bug in standalone.c which caused compile to fail for
some SVR4 systems (function zombie never used but attempt to
compile it anyway failed).

Added support for attribute 'nosearch'.  If Attribute=nosearch
or Attribute=invisible is in a menu item, this item will not
be shown in any type 7c searches.

Added imagemap example in /docs/examples.  (You have to get the
imagemap program from NCSA and compile it to use this.)

CHANGES from version 2.01 to 2.02 (3/15/94)
------------------------------------------
Minor improvements in documentation (installation guide).

Fixed config.h so that NeXT and NeXTStep should compile without
changes.

CHANGES from version 2.0 to 2.01 (2/20/94)
------------------------------------------
Fixed bug in old gn formatted log entries which made them all
one line.

Changed config.h to allow selection of OS type for configuration.

Added info about gn-maint mailing list to README and installation
guide.

Added environment variable GN_ROOT to environment of scripts which
are run with type exec or CGI.

CHANGES from version 1.19 to 2.0 (2/10/94)
------------------------------------------
Added sgn -- a standalone version of gn.  It runs as a daemon
without the use of inetd.  This should be somewhat more efficient
for heavily loaded servers.  It also allows gn to be run on a 
non-priviledged port without root permissions.

Added support for CGI (Common Gateway Interface) scripts.
This is a standard for scripts which are run by HTTP servers.
See http://hoohoo.ncsa.uiuc.edu/cgi/intro.html for more details.
This provides gn support for things like the NCSA imagemap program.

Added support for Maintainer= field in menu files (can only be used by HTTP
clients).  See installation guide.

Added support for Hname= field in menu files (contributed by Craig
Milo Rogers).  This allows HTML in menu lines [see installation
guide].

Added support for "1h" type.  It provides a menu to gopher clients
and an html doc to HTTP clients.  Also changed 0h so that now an
HTTP client can access it with either the URL http://host/path/foo 
or http://host/path/foo.html.  Also the plaintext version can now
be called foo.txt.

Added 7wd and 7wcd types for waisgn.  This allows the server to return
the directory containing the document with a match rather than the
document itself.  Fixed bug in waisgn caused by trying to interpret
http: lines in cache files as references to documents.

Added support for the HTTP/1.0 header Content-encoding.  Savy WWW
clients can download compressed files and decompress on the fly.

In consultation with Mike Vore the format of the standard logfile
has been changed to one which will make his gnlog program more
reliable and simpler.  His program will be bundled with the official
2.0 release.  In the meantime the new format is incompatible with
old versions of his program :(

The chkaccess function is now more efficient than before (if the 
outcome can be deduced from the previous check that information is
used).

The HTML generated by menus with Text= and HttpText= sections is
a little cleaner.  Menus having such sections should have mkcache
rerun on them if the .cache files were produced with 2.0pre8 or
earlier.

Fixed bug posing potential security problem. Fixed another potential
problem which existed in 2.0pre9.

Added support for Attribute=invisible which will never put an item
in a menu, but will allow it to be served.  Useful for inline images.

CHANGES from version 1.19 to 1.19a (2/8/94)
-------------------------------------------- 
Fixed bug posing potential security problem.


CHANGES from version 1.18 to 1.19 (12/27/93)
-------------------------------------------- 

Replaced %d by %ld in printf's which write byte ranges in mkcache.c
since the values written are longs.

Better log message when grep search is attempted on non-searchable
directories.

Changed format of "Last Modified Date" in HTTP headers to be the
one required by the protocol.  (As far as I know no client uses this.)

Fixed bug that caused grep searches to always search the html version
of type "0h" items (i.e. items with both a plain/text and html version).
Now the version searched is the one which will be served, i.e. html
for HTTP clients and plaintext for gopher protocol clients.

Fixed bug that caused some items to be displayed on a menu of matches
for a 7c search even though the client had no access to those items.
Fixed bug in www_unescape() than sometimes made errors in translating
URL % escapes.

Fixed bug in read_cache which sometimes returned random value (which was
fine as long is it was non-zero).

Enhanced exec types by putting lots of information in environment
variables which scripts can use.  The server also now does a chdir()
to the directory containing the script before executing it. Added some
sample scripts in the docs/examples directory.  This is headed towards
a reasonable facsimile of the CGI (Common Gateway Interface) standard
for HTTP.

CHANGES from version 1.17 to 1.18 (12/8/93)
-------------------------------------------- 

Fixed bug in waisgn introduced in 1.17 which made all wais items type 
"0h".

Fixed problem in sio.c that caused characters <, > and & in Name=
lines of menu files to be improperly handled for HTTP.  These 
characters are special for HTML and must be escaped.  (Fix supplied
by Stephen Hebditch).


CHANGES from version 1.16 to 1.17 (12/3/93)
-------------------------------------------- 

Fixed bug introduced in 1.16 that made grep searches not work .  If
you got version 1.16a (look for VERSION in gn.h) this is already
fixed.

Fixed bug in waisgn that caused .cache file to be opened many times.
Added support for type 7wh, i.e. WAIS searches for 0h items.

Fixed uncache.c so uncache is now compatible with new type of
.cache files.

CHANGES from version 1.15 to 1.16 (12/1/93)
-------------------------------------------- 
Rewrote the readcache() function and many of the routines that call
it.  It is now more modular and much cleaner.  This should not affect
functionality or anything external to gn.

Mkcache now uses a case insenstive comparison for the host name 
in the .cache file and the hostname from the command line (or compiled
in).

CHANGES from version 1.14 to 1.15 (11/30/93)
--------------------------------------------
Fixed bug that caused args in "exec" type to be ignored.


CHANGES from version 1.13 to 1.14 (11/29/93)
--------------------------------------------
Fixed bug that made searching structured files (7m) fail if "Subject="
and "Separator=" lines in menu file were with 7m item rather than 1m
item.

CHANGES from version 1.12 to 1.13
------------------------------------
Fixed bugs in chkcache.c and csearch.c which caused .cache searches 
(type 7c) to fail if the menu containing the search item also contained
a remote link.

Fixed mkcache so that items with Path=execX... will have their gopher
type correctly set to X if the Type= field is not present in the menu
entry.

Expanded documentation, including new version of the Installation and
User's Guide.

CHANGES from version 1.11 to 1.12
------------------------------------
Fixed bug that caused "range" type not to have Content-length field.

Fixed bug introduced in 1.11 which made all http text in menus be 
converted to lower case.

CHANGES from version 1.1 to 1.11
------------------------------------
Menu searches (type 7c) were broken by changes introduced in 1.1.  This
has been fixed.

WAIS searches of type 7wc did not return matches from all directories if
the indexed files were in multiple directories.  Only things from the
directory containing the best match were returned.  This is fixed.

File config.h was missing a newline at the end.  This bothers some compilers.
In file init.c fixed bug in sending error message if logfile can't be opened.
Removed the use of strncasecmp (some systems don't have it).  Added a note
to Makefile about compiling on UnixWare.

CHANGES from version 1.07 to 1.1
------------------------------------
Added support for WAIS index searches. See /docs/waisgn.guide.

CHANGES from version 1.06 to 1.07
------------------------------------
Fixed one little tiny bug that only affected links to remote gopherd
items of ftp type.  It's also a little cleaner and more efficient now.

CHANGES from version 1.05 to 1.06
------------------------------------
Fixed major bug introduced in 1.05 that made every item a gopher item!

Fixed bug that excluded type "1m" pseudo-directories from "search all
menus" searches.

CHANGES from version 1.04 to 1.05    
------------------------------------

Fixed bug introduced in 1.04 that was caused by trying to do access
permission checks on remote links.

CHANGES from version 1.03 to 1.04
------------------------------------
Grep searches now *require* the type '7g'.  In the past a selector of
type '7' which referred to a directory worked.

Type '7' shell scripts can now have an argument specified the selector.
E.G.  Path=7:myarg:/dir/dir2/script   will invoke script with first 
argument "myarg" and subsequent args provided by the client search 
request.

Fixed a bug dogrep which failed when reading a .cache file containing
an http: line which had no tabs.  (Found and fixed by Craig Milo Rogers)

Fixed a bug in sio.c that caused http docs to be sent with lines ending
in \r\n rather than just \n.  

Mkcache no longer strips white space from the beginning of lines in
Text/Endtext blocks or httpText/Endtext blocks.

Improved HTTP error messages.

CHANGES from version 1.02 to 1.03
------------------------------------
Added sections on Testing and Trouble Shooting to installation and
maintenance guide.  Also added a rough html version of the this guide.
Added a sample root menu (in the docs directory) and a sample docs/images
which can be used with the menu file in docs/ to create a hierarchy
for testing purposes.

Fixed a bug which caused certain "on the fly" html documents created
in searches to be missing the </body> tag at the end.

CHANGES from version 1.01 to 1.02
------------------------------------
Fixed bug which caused two error messages to be sent in some error
conditions.  Also gopher error messages now are sent as items of 
gopher type '3' as per the protocol.  This causes some older versions
of the UNIX client from MN to core dump.

Added an option to config.h for Ultrix systems to set UID of the process
since it can't be done in inetd.conf. (Thanks to Mike Crowley).

CHANGES from version 1.0 to 1.01
------------------------------------
Added missing gn_mime.types file to distribution and fixed a couple of 
minor bugs.  The naming scheme for versions has been changed.  Version
1.0b was confusing (it is not the same as 1.0beta).  In fact 1.0b = 1.01.
I hope this clears up the confusion.

