summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* give up on trying to encode header values when request.headers is usedChris McDonough2012-01-281-40/+21
|
* get rid of test_requests package, put tests back in test_request.pyChris McDonough2012-01-284-1344/+1326
|
* bytesrequest renamed to legacyrequest... it no longer eagerly converts to ↵Chris McDonough2012-01-284-149/+115
| | | | 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
* test textrequest and bytesrequest independentlyChris McDonough2012-01-285-1108/+1680
|
* turn remote_user_encoding and url_encoding into environ_getters (adding ↵Chris McDonough2012-01-261-2/+9
| | | | 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 EnvironHeaders class to do encoding and decoding properlyChris McDonough2012-01-262-34/+96
|
* make bytesrequest work on python 3Chris McDonough2012-01-262-5/+83
|
* First cut at distinct TextRequest/BytesRequest implementations as aChris McDonough2012-01-252-351/+621
| | | | | | | | | | | | | | | | | | | | 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.
* fix status_int/status bug on py3 (use explicit floor division), add coverageChris McDonough2012-01-081-1/+28
|
* fix test failure on py3Chris McDonough2011-12-301-1/+1
|
* fix https://github.com/Pylons/webob/issues/18 (non-ascii form POST, then ↵Sergey Schetinin2011-12-261-0/+9
| | | | parse, then serialize)
* * Added ``request.client_addr`` API (returns IP address implied byChris McDonough2011-10-281-0/+32
| | | | HTTP_X_FORWARDED_FOR, falling back to REMOTE_ADDR).
* * Added ``request.host_port`` API (returns port number implied by HTTP_HOST,Chris McDonough2011-10-281-0/+49
| | | | falling back to SERVER_PORT).
* Fix NilAccept.best_match() so an empty "offers" + default_match picks defaultChristopher Allan Webber2011-10-181-1/+1
| | | | | | | Prior to this, NilAccept.best_match([], default_match="default") threw: UnboundLocalError: local variable 'best_offer' referenced before assignment Also added a relevant test.
* * Fix ``request.cookies.get('name', 'default')``. Previously ``default`` wasChris McDonough2011-10-151-0/+5
| | | | ignored.
* fix on 2.7+Chris McDonough2011-10-131-0/+1
|
* gardenfeature.pylons10compatChris McDonough2011-10-131-1/+4
|
* be less aggressive about feature removal for benefit of pylons 1.XChris McDonough2011-10-132-1/+11
|
* * Mutating the ``request.cookies`` property now reflects the mutations intofeature.cookie-bug-for-bugChris McDonough2011-10-102-2/+196
| | | | the ``HTTP_COOKIES`` environ header.
* Merge branch 'master' into feature.cookie-bug-for-bugChris McDonough2011-10-081-0/+5
|\
| * improve deprecation warningsChris McDonough2011-10-081-0/+5
| |
* | Merge branch 'master' into feature.cookie-bug-for-bugChris McDonough2011-10-072-7/+20
|\ \ | |/
| * * Undeprecated ``uscript_name`` and ``upath_info``.Chris McDonough2011-10-061-1/+12
| | | | | | | | | | | | | | * 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.
| * * ``Response.request`` and ``Response.environ`` attrs are undeprecated and noChris McDonough2011-10-061-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | * Mutating the ``request.cookies`` property now retains the mutated valueChris McDonough2011-10-062-35/+3
|/ | | | | during the course of a single request (bug-for-bug compatibility with previous versions; in-the-wild codebases depend upon this behavior).
* fix str(Response()) w/o charset, but only on py2Sergey Schetinin2011-10-022-1/+2
|
* add req.json_body (adapted from Pyramid)Sergey Schetinin2011-09-301-0/+26
|
* fix test failures on my machine due to what appears to be a timing issueChris McDonough2011-09-291-1/+1
|
* assertionChris McDonough2011-09-291-1/+1
|
* * ``request.cookies`` property now returns an immutable dictionary;Chris McDonough2011-09-292-1/+38
| | | | attempting to modify it will result in a TypeError.
* remove Accept.best_matches(), add Accept.__iter__()Sergey Schetinin2011-09-262-34/+7
|
* change content-range parsing to regexpSergey Schetinin2011-09-261-53/+15
|
* tidy up testsSergey Schetinin2011-09-261-68/+40
|
* refactor Range to only handle a single rangeSergey Schetinin2011-09-263-134/+54
|
* allow resp.etag = (tag, False) for setting weak etagsSergey Schetinin2011-09-251-0/+5
|
* test coverage; transcode fixes; remove multidict_from_bodyfileSergey Schetinin2011-09-251-1/+21
|
* Merge branch 'sergey-1.2-py2-only' into 1.2-mergeSergey Schetinin2011-09-2510-394/+260
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * merge transcode into requestSergey Schetinin2011-09-221-3/+3
| | | | | | | | * req = req.decode()
| * improve webob.transcodeSergey Schetinin2011-09-221-1/+6
| | | | | | | | | | * add Transcoder * use Request for environ manipulation
| * improve req.charset handlingSergey Schetinin2011-09-222-5/+24
| | | | | | | | | | | | | | | | | | * 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
| * enable weak matching for if-none-matchSergey Schetinin2011-09-212-4/+26
| | | | | | | | | | * parse req.if_none_match with ETagMatcher.parse(val, strong=False) * full tests
| * much stricter parsing for if-none-match, if-range and if-match headersSergey Schetinin2011-09-212-11/+17
| |
| * remove internal weak/strong differentiation in ETagMatcher, filter weak out ↵Sergey Schetinin2011-09-212-86/+31
| | | | | | | | | | | | | | by default * remove ETagMatcher.weak_etags * new arg to ETagMatcher.parse(value, strong=True)
| * change IfRange api to `resp in req.if_range`Sergey Schetinin2011-09-213-76/+37
| | | | | | | | | | | | * when parsing if-range, drop weak etags * remove IfRange.match and .match_response * adjust tests
| * better support for weak response etagSergey Schetinin2011-09-212-5/+15
| | | | | | | | | | | | | | | | * 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
| * GetDict.tracker -> on_changeSergey Schetinin2011-09-202-30/+28
| |
| * change test_transcode not to depend on webob's multipart body encodingSergey Schetinin2011-09-201-10/+10
| |
| * hardcode Request.charset to 'UTF-8'Sergey Schetinin2011-09-201-89/+5
| | | | | | | | | | * 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
| * add webob.transcodeSergey Schetinin2011-09-201-0/+48
| | | | | | | | | | | | * new detect_charset func * _encode_multipart now assumes utf8 and can write to caller-supplied file object * some tests
| * drop UnicodeMultiDict; change TrackableMultiDict -> GetDictSergey Schetinin2011-09-203-64/+21
| | | | | | | | | | | | * decode cgi.FieldStorage in MultiDict.from_fieldstorage * add encoding and errors params to FakeCGIBody * same for _encode_multipart