[Web-SIG] [ANN] nginx mod_wsgi 0.0.4

Manlio Perillo manlio_perillo at libero.it
Sat Dec 1 13:34:46 CET 2007

I'm pleased to annunce the 0.0.4 release for nginx mod_wsgi.

nginx mod_wsgi is an implementation of the WSGI PEP 
(http://www.python.org/dev/peps/pep-0333/) for the Nginx web server.

Starting with this release nginx mod_wsgi is a fully conforming 
implementation of the WSGI specification (but there still can be some 
small problems).

Here is the changelog:

   - Bug fix: `wsgi.errors.write` and `wsgi.errors.writelines` don't
     ignore conversion specification characters, used internally by
     `ngx_log_error` for message formatting.
   - Bug fix: when WSGI application does not set the `Date` or `Server`
     headers, nginx sends duplicate headers.
   - Added a new directive `wsgi_temp_path` and a new variable
     `NGX_HTTP_WSGI_TEMP_PATH` in the config script.

     Improved the write callable buffering support.
   - Fixed an annoying problem with paths without ending slash when
     using `--add-module` configure option.
   - Added patches for support of nginx < 0.5.32 and nginx 0.6.x.
   - Improved the configuration script, with correct external
     Python build dependencies handling.
   - Bug fix: changed again the memory management code, using a queue.
   - Bug fix: broken implementation of ngx_list_pop.
     This solves a memory corruption problem when serving large
     files (using nginx-file sample application) with a "slow" client
     or connection.
   - Improved the write callable so that it now is fully conforming
     with the WSGI spec.

     Replaced the WSGI_BUFFERED_WRITE macro with the
     wsgi_write_buffering directive.
   - Added an alternative implementation of the write callable, that
     buffers all the data.

     This function is the default one used, but this can be changed
     using the WSGI_BUFFERED_WRITE macro in the module configuration

     Added a wsgi_write_buffer_size directive to control the buffer

     Note that this implementation does not conform with the WSGI
   - Added integrated support for cache validation in mod_wsgi using a
     custom header filter.
     Only the `Last-Modified` validator is supported.
   - Added experimental support for the `process` reload mechanism.
   - Implemented the write callable.

     This implementation is limited, since when data cannot be sent to
     OS buffers, an IOError exception is raised.
   - Implemented the start_response callable.
   - Implemented the `wsgi_output_buffering` directive.
     When this directive is disabled (the default) the buffer sent to
     the output filter is flushed.

Note that the default write callable implementation uses an hack to be 
fully conforming (it sets the socket to blocking mode).

Please note that mod_wsgi is not a "standard" nginx module;
It should not be used for embedding Python applications inside your 
primary web server.

Manlio Perillo

More information about the Web-SIG mailing list