Webob

Latest version: v1.8.9

Safety actively analyzes 681844 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 7 of 9

0.9.7

Not secure
-----

* Moved repository from svn location to
https://bitbucket.org/ianb/webob/wiki/Home

* Arguments to :meth:`Accept.best_match` must be specific types,
not wildcards. The server should know a list of specic types it can
offer and use ``best_match`` to select a specific one.

* With ``req.accept.best_match([types])`` prefer the first type in the
list (previously it preferred later types).

* Also, make sure that if the user-agent accepts multiple types and
there are multiple matches to the types that the application offers,
``req.accept.best_match([..])`` returns the most specific match.
So if the server can satisfy either ``image/*`` or ``text/plain``
types, the latter will be picked independent from the order the accepted
or offered types are listed (given they have the same quality rating).

* Fix Range, Content-Range and AppIter support all of which were broken
in many ways, incorrectly parsing ranges, reporting incorrect
content-ranges, failing to generate the correct body to satisfy the range
from ``app_iter`` etc.

* Fix assumption that presense of a ``seek`` method means that the stream
is seekable.

* Add ``ubody`` alias for ``Response.unicode_body``

* Add Unicode versions of ``Request.script_name`` and ``path_info``:
``uscript_name`` and ``upath_info``.

* Split __init__.py into four modules: request, response, descriptors and
datetime_utils.

* Fix ``Response.body`` access resetting Content-Length to zero
for HEAD responses.

* Support passing Unicode bodies to :class:`WSGIHTTPException`
constructors.

* Make ``bool(req.accept)`` return ``False`` for requests with missing
Accept header.

* Add HTTP version to :meth:`Request.__str__` output.

* Resolve deprecation warnings for parse_qsl on Python 2.6 and newer.

* Fix :meth:`Response.md5_etag` setting Content-MD5 in incorrect
format.

* Add ``Request.authorization`` property for Authorization header.

* Make sure ETag value is always quoted (required by RFC)

* Moved most ``Request`` behavior into a new class named
``BaseRequest``. The ``Request`` class is now a superclass for
``BaseRequest`` and a simple mixin which manages
``environ['webob.adhoc_attrs']`` when ``__setitem__``,
``__delitem__`` and ``__getitem__`` are called. This allows
framework developers who do not want the
``environ['webob.adhoc_attrs']`` mutation behavior from
``__setattr__``. (chrism)

* Added response attribute ``response.content_disposition`` for its
associated header.

* Changed how ``charset`` is determined on :class:`webob.Request`
objects. Now the ``charset`` parameter is read on the Content-Type
header, if it is present. Otherwise a ``default_charset`` parameter
is read, or the ``charset`` argument to the Request constructor.
This is more similar to how :class:`webob.Response` handles the
charset.

* Made the case of the Content-Type header consistent (note: this
might break some doctests).

* Make ``req.GET`` settable, such that ``req.environ['QUERY_STRING']``
is updated.

* Fix problem with ``req.POST`` causing a re-parse of the body when
you instantiate multiple ``Request`` objects over the same environ
(e.g., when using middleware that looks at ``req.POST``).

* Recreate the request body properly when a ``POST`` includes file
uploads.

* When ``req.POST`` is updated, the generated body will include the
new values.

* Added a ``POST`` parameter to :meth:`webob.Request.blank`; when
given this will create a request body for the POST parameters (list
of two-tuples or dictionary-like object). Note: this does not
handle unicode or file uploads.

* Added method :meth:`webob.Response.merge_cookies`, which takes the
``Set-Cookie`` headers from a Response, and merges them with another
response or WSGI application. (This is useful for flash messages.)

* Fix a problem with creating exceptions like
``webob.exc.HTTPNotFound(body='<notfound/>',
content_type='application/xml')`` (i.e., non-HTML exceptions).

* When a Location header is not absolute in a Response, it will be
made absolute when the Response is called as a WSGI application.
This makes the response less bound to a specific request.

* Added :mod:`webob.dec`, a decorator for making WSGI applications
from functions with the signature ``resp = app(req)``.

0.9.6.1

Not secure
-------

* Fixed :meth:`Response.__init__`, which for some content types would
raise an exception.

* The ``req.body`` property will not recreate a StringIO object
unnecessarily when rereading the body.

0.9.6

Not secure
-----

* Removed `environ_getter` from :class:`webob.Request`. This
largely-unused option allowed a Request object to be instantiated
with a dynamic underlying environ. Since it wasn't used much, and
might have been ill-advised from the beginning, and affected
performance, it has been removed (from Chris McDonough).

* Speed ups for :meth:`webob.Response.__init__` and
:meth:`webob.Request.__init__`

* Fix defaulting of ``CONTENT_TYPE`` instead of ``CONTENT_LENGTH`` to
0 in ``Request.str_POST``.

* Added :meth:`webob.Response.copy`

0.9.5

Not secure
-----

* Fix ``Request.blank('/').copy()`` raising an exception.

* Fix a potential memory leak with HEAD requests and 304 responses.

* Make :func:`webob.html_escape` respect the ``.__html__()`` magic
method, which allows you to use HTML in
:class:`webob.exc.HTTPException` instances.

* Handle unicode values for ``resp.location``.

* Allow arbitrary keyword arguments to ``exc.HTTP*`` (the same
keywords you can send to :class:`webob.Response`).

* Allow setting :meth:`webob.Response.cache_expires` (usually it is
called as a method). This is primarily to allow
``Response(cache_expires=True)``.

0.9.4

Not secure
-----

* Quiet Python 2.6 deprecation warnings.

* Added an attribute ``unicode_errors`` to :class:`webob.Response` --
if set to something like ``unicode_errors='replace'`` it will decode
``resp.body`` appropriately. The default is ``strict`` (which was
the former un-overridable behavior).

0.9.3

Not secure
-----

* Make sure that if changing the body the Content-MD5 header is
removed. (Otherwise a lot of middleware would accidentally
corrupt responses).

* Fixed ``Response.encode_content('identity')`` case (was a no-op even
for encoded bodies).

* Fixed :meth:`Request.remove_conditional_headers` that was removing
If-Match header instead of If-None-Match.

* Fixed ``resp.set_cookie(max_age=timedelta(...))``

* ``request.POST`` now supports PUT requests with the appropriate
Content-Type.

Page 7 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.