Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 189 lines (131 sloc) 5.949 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
Next release
-------------

Bug Fixes
---------

- A brown-bag bug prevented request concurrency. A slow request would block
  subsequent the responses of subsequent requests until the slow request's
  response was fully generated. This was due to a "task lock" being declared
  as a class attribute rather than as an instance attribute on HTTPChannel.
  ALso took the opportunity to move another lock named "outbuf lock" to the
  channel instance rather than the class.

0.8 (2012-01-31)
----------------

Features
~~~~~~~~

- Support the WSGI ``wsgi.file_wrapper`` protocol as per
  http://www.python.org/dev/peps/pep-0333/#optional-platform-specific-file-handling.
  Here's a usage example::

    import os

    here = os.path.dirname(os.path.abspath(__file__))

    def myapp(environ, start_response):
        f = open(os.path.join(here, 'myphoto.jpg'), 'rb')
        headers = [('Content-Type', 'image/jpeg')]
        start_response(
            '200 OK',
            headers
            )
        return environ['wsgi.file_wrapper'](f, 32768)

  The signature of the file wrapper constructor is ``(filelike_object,
  block_size)``. Both arguments must be passed as positional (not keyword)
  arguments. The result of creating a file wrapper should be **returned** as
  the ``app_iter`` from a WSGI application.

  The object passed as ``filelike_object`` to the wrapper must be a file-like
  object which supports *at least* the ``read()`` method, and the ``read()``
  method must support an optional size hint argument. It *should* support
  the ``seek()`` and ``tell()`` methods. If it does not, normal iteration
  over the filelike object using the provided block_size is used (and copying
  is done, negating any benefit of the file wrapper). It *should* support a
  ``close()`` method.

  The specified ``block_size`` argument to the file wrapper constructor will
  be used only when the ``filelike_object`` doesn't support ``seek`` and/or
  ``tell`` methods. Waitress needs to use normal iteration to serve the file
  in this degenerate case (as per the WSGI spec), and this block size will be
  used as the iteration chunk size. The ``block_size`` argument is optional;
  if it is not passed, a default value``32768`` is used.

  Waitress will set a ``Content-Length`` header on the behalf of an
  application when a file wrapper with a sufficiently filelike object is used
  if the application hasn't already set one.

  The machinery which handles a file wrapper currently doesn't do anything
  particularly special using fancy system calls (it doesn't use ``sendfile``
  for example); using it currently just prevents the system from needing to
  copy data to a temporary buffer in order to send it to the client. No
  copying of data is done when a WSGI app returns a file wrapper that wraps a
  sufficiently filelike object. It may do something fancier in the future.

0.7 (2012-01-11)
----------------

Features
~~~~~~~~

- Default ``send_bytes`` value is now 18000 instead of 9000. The larger
  default value prevents asyncore from needing to execute select so many
  times to serve large files, speeding up file serving by about 15%-20% or
  so. This is probably only an optimization for LAN communications, and
  could slow things down across a WAN (due to higher TCP overhead), but we're
  likely to be behind a reverse proxy on a LAN anyway if in production.

- Added an (undocumented) profiling feature to the ``serve()`` command.

0.6.1 (2012-01-08)
------------------

Bug Fixes
~~~~~~~~~

- Remove performance-sapping call to ``pull_trigger`` in the channel's
  ``write_soon`` method added mistakenly in 0.6.

0.6 (2012-01-07)
----------------

Bug Fixes
~~~~~~~~~

- A logic error prevented the internal outbuf buffer of a channel from being
  flushed when the client could not accept the entire contents of the output
  buffer in a single succession of socket.send calls when the channel was in
  a "pending close" state. The socket in such a case would be closed
  prematurely, sometimes resulting in partially delivered content. This was
  discovered by a user using waitress behind an Nginx reverse proxy, which
  apparently is not always ready to receive data. The symptom was that he
  received "half" of a large CSS file (110K) while serving content via
  waitress behind the proxy.

0.5 (2012-01-03)
----------------

Bug Fixes
~~~~~~~~~

- Fix PATH_INFO encoding/decoding on Python 3 (as per PEP 3333, tunnel
  bytes-in-unicode-as-latin-1-after-unquoting).

0.4 (2012-01-02)
----------------

Features
~~~~~~~~

- Added "design" document to docs.

Bug Fixes
~~~~~~~~~

- Set default ``connection_limit`` back to 100 for benefit of maximal
  platform compatibility.

- Normalize setting of ``last_activity`` during send.

- Minor resource cleanups during tests.

- Channel timeout cleanup was broken.

0.3 (2012-01-02)
----------------

Features
~~~~~~~~

- Dont hang a thread up trying to send data to slow clients.

- Use self.logger to log socket errors instead of self.log_info (normalize).

- Remove pointless handle_error method from channel.

- Queue requests instead of tasks in a channel.

Bug Fixes
~~~~~~~~~

- Expect: 100-continue responses were broken.


0.2 (2011-12-31)
----------------

Bug Fixes
~~~~~~~~~

- Set up logging by calling logging.basicConfig() when ``serve`` is called
  (show tracebacks and other warnings to console by default).

- Disallow WSGI applications to set "hop-by-hop" headers (Connection,
  Transfer-Encoding, etc).

- Don't treat 304 status responses specially in HTTP/1.1 mode.

- Remove out of date ``interfaces.py`` file.

- Normalize logging (all output is now sent to the ``waitress`` logger rather
  than in degenerate cases some output being sent directly to stderr).

Features
~~~~~~~~

- Support HTTP/1.1 ``Transfer-Encoding: chunked`` responses.

- Slightly better docs about logging.

0.1 (2011-12-30)
----------------

- Initial release.


Something went wrong with that request. Please try again.