summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* FieldStorage.read_multi needs fixup until Python bug 27777 is closedbugfix/cgi_FieldStorageBert JW Regeer2016-11-181-9/+7
|
* Add workaround for Python bug 27777Bert JW Regeer2016-11-171-52/+72
| | | | This also fixes Python bug 24764.
* Add some tests for compat cgi_FieldStorageBert JW Regeer2016-11-171-0/+88
| | | | | This makes sure that we don't regress on our FieldStorage support across supported versions of Python
* Update documentation indentationBert JW Regeer2016-11-171-3/+3
|
* Remove test for key in set_cookieBert JW Regeer2016-11-171-18/+0
|
* Update changelog for set_cookieBert JW Regeer2016-11-171-0/+3
|
* Remove key from Response.set_cookieBert JW Regeer2016-11-171-6/+1
| | | | We are upon WebOb 1.7
* Fix Response.__init__ documentationBert JW Regeer2016-11-161-6/+6
| | | | Closes #288
* Merge pull request #291 from Pylons/fixup/PATH_SAFEBert JW Regeer2016-11-165-8/+24
|\ | | | | Fixup: PATH_SAFE
| * Add changelog for #291Bert JW Regeer2016-11-161-1/+4
| |
| * Update test with all newly un-pct-encoded charsBert JW Regeer2016-11-161-1/+1
| |
| * Update tox and travis Python versionsfixup/PATH_SAFEBert JW Regeer2016-11-162-5/+12
| | | | | | | | Remove PyPy3, it is no longer supported by pip
| * Update PATH_SAFE to include all safe characters from RFC3989Bert JW Regeer2016-11-161-1/+1
| | | | | | | | Closes #290
| * Add test to verify paths are percent encodedBert JW Regeer2016-11-161-0/+6
|/
* Update CHANGES.txtBert JW Regeer2016-10-021-3/+8
|
* Merge pull request #286 from Pylons/perf/responseBert JW Regeer2016-10-025-92/+216
|\ | | | | Performance: Response
| * Location header requires a HTTP status code that supports itperf/responseBert JW Regeer2016-10-021-0/+1
| |
| * Further content_type/charset cleanupsBert JW Regeer2016-10-021-29/+71
| |
| * Add tests to verify current behaviour for charsetBert JW Regeer2016-10-021-0/+24
| |
| * HTTP Status code 205 also has no bodyBert JW Regeer2016-10-021-1/+1
| |
| * Update tests for making location absoluteBert JW Regeer2016-10-021-14/+29
| |
| * Making Location header absolute is now less costlyBert JW Regeer2016-10-021-14/+21
| | | | | | | | | | | | __call__ and conditional_response_app both wanted a copy of the headerlist anyway, so iterate and if we stumble upon a Location header, make it absolute.
| * Speedup header deletionBert JW Regeer2016-09-301-4/+1
| |
| * Add test for resp.content_type = 'someval'Bert JW Regeer2016-09-301-0/+5
| |
| * Add new tests for Response.__init__Bert JW Regeer2016-09-301-0/+40
| | | | | | | | | | Add tests for class defaults. There were no tests for default_content_type or default_charset
| * Fix testsBert JW Regeer2016-09-301-2/+2
| |
| * Cleanup tests for Response.__init__Bert JW Regeer2016-09-301-16/+3
| |
| * Content-Type is not added if a headerlist is providedBert JW Regeer2016-09-301-31/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the user provides a headerlist, Response.__init__ will no longer attempt to set the default Content-Type, nor will __init__ add a charset to any existing Content-Type. The Content-Type will only be set if no headerlist is provided, and the HTTP status code allows for a body. The charset will be set only if there is no charset on the Content-Type provided. Response(headerlist=[], content_type='text/plain', charset='UTF-8') will have a headerlist that is: [('Content-Length', '0')] Response(status='204 No Content') will have a headerlist that is: [] __init__ will now also ignore body/app_iter if the status code has no body. Response(status='204 No Content', app_iter=[b'test']) Will not have a Content-Length, and .body will return b''. If you would like to violate HTTP standards, you may of course do: resp = Response(status='204 No Content') resp.body = b'test' __init__ won't let you create an invalid resonse, what you do with the returned response however is up to you.
| * Skip the property, use the underlying val directlyBert JW Regeer2016-09-301-1/+1
| |
| * Use list comprehension to return listBert JW Regeer2016-09-301-5/+1
| |
| * Speed up __setitem__ in ResponseHeaderBert JW Regeer2016-09-301-4/+1
|/ | | | | | When removing existing entries, just create a new list and assign it to the old list. This is faster than calling del item[i] on the items we want removed.
* Add CHANGES.txt for PR 287Bert JW Regeer2016-09-301-0/+9
|
* Merge PR #287 (feature/default_body_encoding)Bert JW Regeer2016-09-302-10/+33
|\ | | | | Adds a new default_body_encoding that is used in cases where the Response charset is not available so that .text can continue to be used.
| * Update tests for default_body_encodingfeature/default_body_encodingBert JW Regeer2016-09-301-2/+14
| |
| * Teach Response about default_body_encodingBert JW Regeer2016-09-301-8/+19
| | | | | | | | | | | | | | This is mainly used to allow users to continue using .text even with Content-Types that don't have a charset. Looking at you Pyramid...
* | Cleanup some messages in CHANGES.txtBert JW Regeer2016-09-301-1/+5
| |
* | Update CHANGES.txtBert JW Regeer2016-09-301-0/+13
|/
* Merge pull request #283 from Pylons/fix/bodies_on_everythingBert JW Regeer2016-09-303-168/+219
|\ | | | | All request methods may now have a body
| * Update docstringfix/bodies_on_everythingBert JW Regeer2016-09-291-2/+2
| |
| * Add DeprecationWarning for FakeCGIBodyBert JW Regeer2016-09-291-0/+7
| | | | | | | | Closes #276
| * PEP8Bert JW Regeer2016-09-291-33/+36
| |
| * Invalid indentBert JW Regeer2016-09-291-1/+1
| |
| * Fix some test helpersBert JW Regeer2016-09-291-2/+10
| |
| * Without Content-Length, we don't read bodyBert JW Regeer2016-09-291-2/+8
| | | | | | | | | | If there is no Content-Length then we don't read the body, thus the tests that used to be able to assume True are now no longer True.
| * Rework req.copy_body()Bert JW Regeer2016-09-291-44/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | copy_body() used to treat chunked encoding (or at least reading from wsgi.input without a valid Content-Length, could be user provided body_file_raw and didn't set Content-Length) with no consideration for the amount of data that could be on the other end. This could potentially allow for a VERY large python bytes() object to be allocated followed by a very large BytesIO(), which then one line later it would copy to a temporary file, damage already done. The new changes will read up to Content-Length if it is available, if not but the body is still marked readable, it will attempt to read from the input until it is exhausted. Up to req.request_body_tempfile_limit will be stored in a BytesIO, after that it will instead write it to a temporary file. So even if the other end is sending 100's of MB worth of data it won't blow up your Python process.
| * req.body gets some minor cleanupsBert JW Regeer2016-09-291-10/+10
| | | | | | | | You can now set req.body for any request method.
| * Remove http_method_probably_has_bodyBert JW Regeer2016-09-291-39/+25
| | | | | | | | | | | | This also changes req.from_file in that now it will attempt to read the entire file for the body if no Content-Length is set, even if the request method generally does not have a body (such as GET/DELETE).
| * Remove unused importsBert JW Regeer2016-09-291-3/+0
| |
| * UnseekableInput now allows reads larger than lengthBert JW Regeer2016-09-291-1/+2
| |
| * Use UnseekableInput to test for no seekBert JW Regeer2016-09-291-0/+4
| |