[PATCH 0 of 2] Make Mercurial have WSGI compliant layer

hopper at omnifarious.org hopper at omnifarious.org
Fri Jun 23 17:33:12 UTC 2006


These two patches implement a WSGI compliant layer in the Mercurial web
interface.  A WSGI compliant application object can be created using the
mercurial.hgweb.wsgiapplication class.

I think these patches are ugly, but I don't think there is a clean way
to do this.  WSGI requires a strict separation of responsibilities
between the application and web server.  There has been a lot of
crossover in this area in the past.

In particular, the way keepalive was implemented required information to
be communicated from the application layer to the server about whether
or not a connection could be left open explicitly.  This should only be
done by the server making a decision based on the existence of a
Content-Length header.

This means that keepalive may no longer work.

These changes can be pulled from:

http://hg.omnifarious.org/~hopper/webmerc

or from the attached bundle, which assumes you have
5b496180c5c26380018c8e92d69d1d3eeae67839 from crew.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wsgi.mbdl
Type: application/octet-stream
Size: 4037 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20060623/a8299ebd/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20060623/a8299ebd/attachment-0001.asc>


More information about the Mercurial mailing list