| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
| |
bytes, it just presents the older native string api expected by existing systems. textrequest renamed to baserequest, it is the new default request type.. it no longer eagerly converts to text, either unless an encattr is named on the environ_decoder
|
| | |
|
| |
|
|
| |
webob.remote_user_encoding and webob.url_encoding vars to environ), fix _request_uri for Python 3, improve _abs_headerlist, dont decode scheme when looking up
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fix for issue #21.
TextRequest is the default when Request or BaseRequest is imported under
Python 3 for backwards compatibility. The only difference Python 3 users
should see after upgrading to this: script_name and path_info will be
decoded, and methods which erroneously dealt in raw environ values will
now deal correctly in text.
BytesRequest is the default when Request or BaseRequest is imported under
Python 2 for backwards compatibility. It works just like the old BaseRequest
under Python 2. Under Python 2, environ values are still dealt with as
bytes by all methods. Under Python 3, it coerces all environ values to bytes.
It's doubtful anyone will use this under Python 3.
Either BytesRequest or TextRequest are usable directly under Python 2 or
Python 3, but the intent is to transition people over time to TextRequest on
both. Certainly new frameworks could start off using TextRequest.
|
| | |
|
| | |
|
| |
|
|
| |
parse, then serialize)
|
| |
|
|
| |
HTTP_X_FORWARDED_FOR, falling back to REMOTE_ADDR).
|
| |
|
|
| |
falling back to SERVER_PORT).
|
| |
|
|
|
|
|
| |
Prior to this, NilAccept.best_match([], default_match="default") threw:
UnboundLocalError: local variable 'best_offer' referenced before assignment
Also added a relevant test.
|
| |
|
|
| |
ignored.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
the ``HTTP_COOKIES`` environ header.
|
| |\ |
|
| | | |
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| |
| | |
* For backwards compatibility purposes, switch ``req.script_name`` and
``path_info`` back again to contain "raw" undecoded native strings rather
than text. Use ``uscript_name`` and ``upath_info`` to get the text version
of SCRIPT_NAME and PATH_INFO.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
longer raise exceptions when used. These can also be passed to the
Response constructor. This is to support codebases that pass them to the
constructor or assign them to a response instance. However, some behavior
differences from 1.1 exist. In particular, synchronization is no longer
done between environ and request attribute properties of Response; you may
pass either to the constructor (or both) or assign one or the other or
both, but they wont be managed specially and will remain the same over the
lifetime of the response just as you passed them. Default values for both
``request`` and ``environ`` on any given response are ``None`` now.
|
| |/
|
|
|
| |
during the course of a single request (bug-for-bug compatibility with
previous versions; in-the-wild codebases depend upon this behavior).
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
attempting to modify it will result in a TypeError.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
tests/test_descriptors.py
tests/test_etag.py
tests/test_misc.py
tests/test_multidict.py
tests/test_request.py
tests/test_request_nose.py
tox.ini
webob/cookies.py
webob/dec.py
webob/descriptors.py
webob/etag.py
webob/exc.py
webob/multidict.py
webob/request.py
webob/response.py
|
| | |
| |
| |
| | |
* req = req.decode()
|
| | |
| |
| |
| |
| | |
* add Transcoder
* use Request for environ manipulation
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
* allow creating request with non-utf-8 charset in content-type
* actually detect charset for req.charset
* when setting allow noop assigns
* check charset in POST
* allow GET to work with any charset
* add _content_type_raw attr
|
| | |
| |
| |
| |
| | |
* parse req.if_none_match with ETagMatcher.parse(val, strong=False)
* full tests
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
by default
* remove ETagMatcher.weak_etags
* new arg to ETagMatcher.parse(value, strong=True)
|
| | |
| |
| |
| |
| |
| | |
* when parsing if-range, drop weak etags
* remove IfRange.match and .match_response
* adjust tests
|
| | |
| |
| |
| |
| |
| |
| |
| | |
* when setting resp.etag to a well-formed value, do not escape it
* when reading resp.etag return weak etag contents as well (was returning None)
* add resp.etag_strong r/o attr that returns the same value as resp.etag for strong etags
and None otherwise
* change IfRange matching to use etag_strong
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
* raise errors if trying to pass non-utf8 charset to Request or to set it later, same for
* remove unicode_errors, raise errors if passed into constructor
|
| | |
| |
| |
| |
| |
| | |
* new detect_charset func
* _encode_multipart now assumes utf8 and can write to caller-supplied file object
* some tests
|
| | |
| |
| |
| |
| |
| | |
* decode cgi.FieldStorage in MultiDict.from_fieldstorage
* add encoding and errors params to FakeCGIBody
* same for _encode_multipart
|