# WebKit 1.1 Release Notes

WebKit version 1.1 released on 08/03/11

## New Features

- In WebKit/Adapters you find a new adapter WSGIAdapter.py allowing any WSGI compliant webserver to communicate with the Webware application server. You can use it straight away as WSGI application script file for mod_wsgi.
- All worker threads are now tagged as daemon threads by default, thereby allowing the app server to quit even if some of them cannot be told to quit their work. This can be changed via the new AppServer.config setting `UseDaemonThreads`.
- Two new session store classes have been added, `SessionShelveStore` (using the shelve module) and `SessionMemcachedStore` (using python-memcached). The latter one is very useful if you want to share Webware sessions between different app server instances. You can activate and configure the new classes in Application.config.
- A mod_webkit binary for Apache 2 64bit on Windows is now included.
- With the new AppServer.config setting `SilentURIs` you can specify request URIs for which you don't want messages with request info to be printed in the server output. By default, as earlier, all requests will appear in the server output.
- Changes in servlet classes are not picked up using the AutoReload mechanism; the corresponding modules are simply reloaded. However, this can cause problems when other modules are dependent on the reloaded modules, e.g. by inheriting from the reloaded servlet class. For such cases, the new Application.config setting `ReloadServletClasses`, when set to `False`, can be used to suppress reloading of servlet classes and utilizing the AutoReload mechanism for reloading the servlet classes instead (Bug 3016673 reported by Patrick Gendron).
- A new setting `AlwaysSaveSessions` has been introduced that can be set to `False` in order to avoid saving unaltered sessions (as suggested by Steve Schwarz).
- The mod_webkit2 adapter now also works with 64bit builds of Apache 2.2; we have included pre-compiled 32bit and 64bit dll files for Windows.

## Improvements and Refinements

- Made the mimetype guessing a bit more robust.
- Instead of `mx.DateTime` types, we now use the native datetime types for cookie expiration in `HTTPResponse`.
- We now set the close-on-exec-flag on the ThreadedAppServer socket (as suggested by Justin Akehurst).
- The mod_webkit2 adapter would interpret the WKServer host address as IPv6, but later created the socket connection with IPv4 even if it was an IPv6 address. Fixed this so that the WKServer address is always interpreted as IPv4. The ThreadedAppServer only listens on an IPv4 socket anyway.
- If the AppServer is launched with `runProfile = False` (see Profiler.py for details), then the profiling will be done with the `cProfile` module instead of the `profile` module if possible (Python 2.5 and later).
- The `Sessionstore.cleanStaleSessions()` method has been made a bit more robust.
- In the `AutoReloadingAppServer`, we do not add files more than once to the watchlist any more. If a FAM module cannot be initialized, we try to use the alternative FAM modules. Besides `python-fam` and `python-gamin`, we now support `pyinotify`.
- Slashes in module names (from nested contexts) are now replaced with underscores, to make PSP and KidKit work with PyPy as well.

## Minor API Changes

- We are now only using new-style classes in our code base.
- The internal `asclocaltime` function has been from `WebKit.Common` to `MiscUtils`.

## Bugfixes

- The mod_webkit2 adapter interpreted the WKServer host address as IPv6 in newer Linux versions and then was unable to connect.
- Thread dumps now work with Python 2.5 and later (and the threadframe module isn't necessary here any more).
- For some kinds of bad URLs, the URLParser raised an AssertionError instead of HTTPNotFound.
- The modified `FieldStorage` class used by WebKit did not work as before with Python 2.6 and newer. These Python versions already add query string parameters to the fields passed via POST, but differently to how we did this before. In WebKit, POST parameters used to completely override query string parameters, the values were not appended to possibly existing values in the query string. In order to stay compatible and because it seems to be more reasonable, we restored the old behavior even for newer versions of Python (thanks to Fionn Behrens for bringing this up).
- Fixed a problem with FAM when files were imported while the thread loop was initialized.
- The `IncludeEditLink` setting had always been ignored (assumed to be True).
.
- The `ServletCache` page in the Admin context did not show anything when caching was not activated.

## Deprecations

- The methods and objects which have been marked as deprecated in version 1.0 and modules that are now available in the standard library have been removed in Webware for Python 1.1, particularly: `HTTPRequest.ServerSideDir`, `HTTPRequest.relativePath`, `HTTPRequest.servletFilePath` and `HTTPResponse.addHeader`. Removed support for the `404Text.txt` file name (it is called `error404.html` now) and the `Port` setting (which is `AdapterPort` now).
- The `Object` root class for WebKit objects has gone. It made things unnecessary complicated and did not contribute much functionality besides named value access which hardly anyone was uning and has now been removed anyway.
- The internal `WebKit.Common` module is also gone. It was mostly used for creating backward compatibility with old Python versions which is now not necessary any more. Also, wild card imports (as in `from Common import *`) are considered bad practice.