# Library 5.0 Release Notes

If you are reading the text version of this document then you can find a HTML version in

    	Library/User/ReleaseNotes.html

This release was originally called 4.1 but because we now have a complete HTTP/1.1 client side implemenation including a persistent cache manager and full support for uploading documents, we decided to call it version 5.0 instead. The main new features are:

- Full HTTP/1.1 reference implementation
- Persistent cache manager
- Full support for PUT and POST
- Application profiles for easier setup
- Many new access methods for using libwww
- Simple Tcl interface
- Configuration based on autoconf

The focus for version 5.0 of the W3C Reference Library is to provide a set of higher level, application specific APIs for accessing the Web. The Library contains a significantly improved interface for easy access to the Web through a large set of functions specialized to perform certain Web operations like `PUT`, `POST`, `DELETE`, `GET` and `HEAD`. The Library now includes a set of profiles that helps the application, a Web client for example, to more easily use the full potential of the application independent Library core.

It supports HTTP/1.1 including persistent connections, two-way `PUT`, the host header and many other features. This release contains a TCL add-on to the Robot example application and a beta version of a Deja GNU Test suite for the Library. There is also a sample PEP implementation, that although incomplete can give an idea of where we're headed using PEP.

Check out the latest list of public functions

## Release 5.0a October 10 1996

### New Features and APIs

- Added support for byte range requests from the cache so that we can update parts of documents in the cache.
- We now use `Content-Location` when gerenating the Request URL for a request with other any other method than `GET` and `HEAD`
- We have created a HTResponse to handle metainformation before it goes into the HTAnchor object. This avoids the problem of overwriting metainformation in the HTAnchor object
- Added insertion sort mechanism to the HTList Object. The comparison function is passed as a parameter to the sorting function
- Added support for OPTIONS in line mode browser.
- Added `HTCache_flushAll()` to the HTCache manager.
- Added flush and a couple of other persisten cache command in the Line mode browser. flush deletes the persistent cache on disk and in memory.

### Changes and Updates

- We have updated the HTGuess stream to work on the Response object instead of the anchor object
- We have changed the name of `HTBind_getBindings` to `HTBind_getAnchorBindings` and added `HTBind_getResponseBindings` in the HTBind module
- HTNetCall_delete now deletes ALL instances of a specific filter. That is, if a single filter is registered to handle multiple status codes then it is now deleted completely using this function.
- We have changed the registration of `Cache-Control` directives so that they now are treated as replacements instead of additions. This way, we don't get duplicate entries
- Changed behavior of the Cache Filter so that a cache load doesn't call the global ingoing filters.
- Updated Tee stream to make it more robust
- Changed the definition of HTParserCallback to contain a HTResponse object in addition to the HTRequest object. This allows us to parse the response into the response object instead of the request and the anchor object. It also allows us to do lazy parsing of many of the headers belonging to the Anchor object.
- Changed the HTNet Filter API so that the filters now can be registered with a URL template for when they are to be called and a filter ordering deciding the order of which the registered filters are to be called. The ordering is simply an integer between `HT_FILTER_FIRST` and `HT_FILTER_LAST` with `HT_FILTER_MIDDLE` being the normal case. Also, there is now a difference between BEFORE and AFTER filters in that the after filters are registered with a status code for when they are to be called whereas the before filters are not. The API is now so that you can register filters locally in the HTRequest object using `HTRequest_addBefore` and `HTRequest_addAfter` and globally in the HTNet object using `HTNet_addAfter` and `HTNet_addBefore`
- We have changed the HTAnchor methods for handling allowed methods on the object to be called `HTAnchor_allow` instead of `HTAnchor_methods`. This then follows the header name as all other HTAnchor methods.
- `HTCache_setSize` and `HTCache_size` are no longer public functions as they only belong to the cache manager
- We have changed the HTTP state machine so that a "204 No Content" response never is expected to contain a body part.

### Bugfixes

- In HTHost.c: HTHost_nextPendingNet() there was a missing pair of brackets. As a consequence, `NULL` structures were pushed into the `host->pipeline` stack.
- Now the memory cache filter only checks for cached documents on `GET` requests.
- The HTTP State machine didn't catch an error code returned by a POST callback function
- We don't flush any metainformation on a `TRACE` method or a `OPTIONS` method request anymore
- Now we copy information from the cache index back to the anchor obejct when we read the index while starting up.
- Automatic connection recovery had a problem when restarting a HTTP/1.1 persistent connection after premature close (thanks to Markku Savela)
- We have fixed a problem in handling `OPTIONS` requests on URL other than "/". The path didn't contain an initial "/"

## Release 5.0 September 10 1996

The 5.0 release has now a full persistent cache manager which works on Unix, and Windows NT. It has not been tested on other platforms, but it is based on strict ANSI C and has been designed to be portable.

### Bug Fixes

- Changed `HTGetTmpName` not to use tempnam() anymore as it caused problems.
- Added argument to `HTParseTime` so that we can decide whether we want to expand relative times or not.
- The request pointer passed to a progress notification may be `NULL` -be aware!

## Release 4.1b5 August 24 1996

Release 4.1b5 is mainly a bug fix release after intensive testing against the Common Lisp Server which also is a HTTP/1.1 application. However, it also has a few new features worth noting.

### New Features

- Added support for the entity-tag validator headers: `If-Match` and `If-None-Match` and also for the date validators `If-Modified-Since` and `If-Unmodified-Since`. We only use either etags or date stamps and the entity-tag validators have precedence over the date validators.
- Added acinclude.m4 in the WWW directory. The file is used by automake
- Changed the configure script to handle the location of the icons distributed as part of the libwww distribution package.
- Added full support for `Cache-Control` header and `Connection` header. Both headers can have an association list of name value pairs as directives.
- Moved the memory cache handler (history handler) from the line mode browser to be a BEFORE filter which can be used by other applications as well. It is now included as part of the client profile.
- Changed the expiration handling API to not include any notification messages. Any messages to be transmitted to the user is now handled by the Alert manager.
- Added persistent cache manager to the client profile.
- Added validation command to the line mode browser
- Changed the cache validation management in the Request object. The validation scheme is now compatible with HTTP/1.1 caching including handling of the history list. We have changed the validation enumerations from
  - `HT_ANY_VERSION`, `HT_MEM_REFRESH`, `HT_CACHE_REFRESH`, `HT_FORCE_RELOAD`
  - `HT_CACHE_OK`, `HT_CACHE_FLUSH_MEM`, `HT_CACHE_VALIDATE`, `HT_CACHE_FLUSH`.

### Bug Fixes

- Fixed problem when getting a `connection` header with the `close` directive. The problem caused libwww to loop as it recursively tried to free the input stream pipe
- Fixed bug in access authentication which could cause libwww to loop if the top level of the site was protected.
- Fixed bug that caused a core dump if receiving a message body without any `content-type`. Now the data is passed to the guessing stream which hopefully can handle it.

## Release 4.1b4 August 20 1996

HTTP version 1.1 allows for effective use of persistent connections. However, in orderto make this work, a client application must be capable of recovering from a closed connection between sent requests. The beta 4 version of libwww supports automatic connection recovery and provides the functionality for performing pipelining of requests. That is, there can be multiple outstanding requests on the same connection In order to do this, the release contains modifications to the Channel Object, the Host object and the Net object.

### New Features

- Added support for case-insensitive searching for proxies via environment variables
- Added support for proxy authentication
- Changed handling of proxies so that they are not included in the URL but is now instead part of the request object. This allows for better handling of proxies and also for more freely use of the proxy filter as it doesn't affect the other filters anymore.
- Added support for TRACE HTTP method in the HTAccess module.
- Updated News DLL and incorporated News patches from Maciej Puzio
- `HT_PERSISTENT` is now obsolete and should be replaced by `HT_PENDING`
- The `HTChannelMode` enumeration describing the flow of a channel has been replaced by `HTTransportMode` as it is now a part of the transport object and not the channel object
- `HTNet_idle()` has been removed and replaced by `HTNet_isIdle()`. The function returns YES if there are no pending requests in libwww at all.
- Add support for checking public information about a host and use this information when issuing a PUT, for example. Also add check for host element in HTAccess when doing PUT. We may have public information available
- Changed the return codes defined in HTUtils to reflect the values of the HTTP spec.
- Added support for `305 Use Proxy` redirections
- Updated HTDir module to better use the fact that we know that an entry is a directory or not. Now it appends a '/' to the URL if it is a directory. That way we often avoid a redirection.
- Removed WWWRules as interface and merged it with the WWWApp interface. The reason was that the two were highly alike and depended on each other

### Bug Fixes

- Fixed problem with uploading directory listing using chunked encoding
- Fixed autoconf to handle WAIS and updated the HTWAIS.c module
- Fixed race problem in PUT on alphas
- Tested reentrant version of libwww (uses `_REENTRANT` define)
- Fixed problem in file name conversion from URL to local format on Windows

## Release 4.1b3 July 20 1996

The file access module now does content negotiation by default. This means that all local file access (including from client applications) do content negotiation when accessing local files. Content negotiation can be turned off by setting a flag in the request object.

A main difference in beta 3 is that we now have a set of "application profiles" that helps the application to initialize libwww core to work as a typical client, robot or other type of application. This should replace the huge initialization procedure seen in previous versions. This is in fact a result of the core being so flexible - it is inly a framework for accessing the Web. The application must initialize all the functionality at run-time. You can see the various profile functions in the WWWInit interface.

The second main difference is that the BEFORE and AFTER filters have been more explicit than before. The `HTLoadStart` and `HTLoadTerminate` functions actually covered many typical BEFORE and AFTER filter functions like looking for proxies, searching the cache, looking for rule file matching, and logging etc.

However, two functions were not covered by this: redirection and authentication. That is why the application in previous version had to supply this functionality. However, in beta 3 we have split up the `HTLoadStart` and `HTLoadTerminte` functions into a set of filters which each perform only a single function, for example looking for proxies. The split has two functions: first it shows how you can use filtes to add new functionality to the Library and second it can be used by more types of applications. A result of the new filters is that we also have default redirection and authentication filters so you don't have to provide this anymore.

The filters are set up as part of the profiles so you will normally not have to register them individually.

### New features and Changes

- Introduced HTUserprofile class to handle host and user specific information
- Added Chunked decoding and encoding module
- A host name is not expanded to a fqdn name as it is not reliable enough. Now we just keep it as is, that is we don't expand www to www.w3.org, for example.
- Updated HTML parser to support `BASE` tag and `LINK` tag
- Added new access methods to the HTAccess module. It is now part of the WWWApp interface
- Updated the Icon module and added icons to the distribution file
- Added a Stream to Chunk converter for easier conversion of streams into dynamic memory buffers
- Introduced HTLib as a new core module. It contains generic information about the core which used to be in the HTAccess module.
- Added support for HTTP/1.1. Most of the HTTP/1.1 specification is now in place, we still need some headers and some features but this version can be considered to be compliant.
- Added suport for proxy authentication as specified by HTTP/1.1
- Added support for case-insensitive searching for proxies via environment variables
- Changed handling of proxies so that they are not included in the URL but is now instead part of the request object. This allows for better handling of proxies and also for more freely use of the proxy filter as it doesn't affect the other filters anymore.

### Bug Fixes

- Fixed problem with uploading directory listing using chunked encoding
- Fixed problem in the rule file parser. It didn't parse the last line of the config file
- Fixed autoconf to handle WAIS and updated the HTWAIS.c module
- Fixed race problem in PUT on alphas which caused the PUT operation to hang under certain circumstances

## Release 4.1b1 May 20 1996

### New Features

- Introduced GNU autoconf configure script for compiling on Unix platforms instead of the old BUILD script. This should make it a lot easier to compile on Unix as we get all the advantages of GNU autoconf.
- Introduction of the HTUserprofile Class which keeps track of a "user" known to the Library
- New access authentication interface allowing for dynamic registration of new access authentication mechanisms. It provides an easy API for hooking in new schemes.
- Improved handling of trace messages which allows for easy redirection of trace messages
- Support for registration of content coders/decoders and content transfer encoders/decoders. This is done the same way as for media types by registering a set of streams that can handle the various encodings.
- Support for chunked decoding
- Introduction of the HTHost Class which keeps track of information about remote hosts
- The DNS Class has been simplified to handle DNS queries only. All additional information about the remote host is defined by the HThost Class.
- We have a new HTEvent module which allows for dynamic registration of an event manager. This will make it much easier to use external event managers together with libwww. If you wish to continue to use the event loop from HTEvntrg, you must register it explicitly with HTEventrgInit. This call is demonstrated in HTBrowse.
- The HTStream module has been created containing a set of basiv streams such as an error stream etc.
- Introduction of the HTTransport Class. This allows for dynamic registration of transport protocols such as for example the W3Mux protocol, TCP access, local file access etc.
- All MIME parsing is now done with registered parsers. The HTMIME module only unwraps the MIME header fields and calls the best parser. The header parsing origonally done in HTMIME can be found in HTInit.c and is registered with HTMIMEInit. This call is demonstrated in HTBrowse.