Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 🐛Replace use of deprecated ConfigParser.readfp | Sviatoslav Sydorenko | 2023-01-09 | 1 | -1/+1 |
| | |||||
* | Revert "🔧 Stop using the `cgi` stdlib module" | Sviatoslav Sydorenko | 2023-01-09 | 1 | -7/+2 |
| | | | | This reverts commit 6b7c2cdc91ca5ba1f6cf3e5d9e8e386266c64ce6. | ||||
* | 🔧 Stop using the `cgi` stdlib module | Sviatoslav Sydorenko | 2023-01-05 | 1 | -2/+7 |
| | | | | This module is deprecated since Python 3.11. | ||||
* | 🎨 Upgrade pydocstyle to the recent version | Sviatoslav Sydorenko | 2023-01-05 | 1 | -5/+7 |
| | |||||
* | 🎨 Adjust line length in code across the repo | Sviatoslav Sydorenko | 2023-01-05 | 2 | -6/+10 |
| | | | | This patch makes it shorter to fit the 79 char limit. | ||||
* | Introduce SanitizedHost wrapper. Fixes #1974. | Jason R. Coombs | 2022-07-17 | 1 | -0/+30 |
| | |||||
* | Use context managers to close files properly and fix tests on PyPy | Michał Górny | 2022-02-01 | 4 | -21/+12 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use context managers (`with`) to ensure that all open files are closed correctly. This resolves resource leaks and test failures with PyPy3.7. The code prior to this change used four approaches for closing files: 1. Using a context manager (`with` clause). 2. Using a try/finally clause. 3. Closing the file in the same scope (unreliable: file object can leak on exception). 4. Not closing open files at all. The last point is a real problem for PyPy since it does not GC unreachable objects as aggressively as CPython does. While leaving a function scope on CPython causes the file objects private to it to be destroyed (and therefore closed), in PyPy they can stay dangling for some time. When combines with buffered writes, this means that writes can still remain pending after returning from function. Using a context manager is a simple, consistent way to ensure that the file object is closed once it is no longer needed. In turn, this guarantees that all pending writes will be performed upon function return and the code won't be hiting race conditions between writing a file and reading it afterwards. | ||||
* | Close streamed file in file_generator on destruct | Duncan Bellamy | 2021-01-17 | 1 | -0/+5 |
| | |||||
* | Fix compression level in meta header in gzip toolbugfixes/1849-gzip-compression-header-cpython-bug39389 | Sviatoslav Sydorenko | 2020-11-15 | 1 | -2/+22 |
| | | | | | | | | | | * https://bugs.python.org/issue39389 * https://github.com/python/cpython/pull/18077 * https://github.com/python/cpython/pull/18100 * https://github.com/python/cpython/pull/18101 Fixes #1849 | ||||
* | Reflow the comment in _make_content_disposition | Sviatoslav Sydorenko | 2020-04-17 | 1 | -6/+6 |
| | | | | This fixes the lines exceeding 79 chars limit | ||||
* | Fix typos in all NFKC references | Sviatoslav Sydorenko | 2020-04-17 | 1 | -3/+3 |
| | |||||
* | Move normalization algorithm description from docstring to code comments. | Jan Rieger | 2020-04-17 | 1 | -8/+7 |
| | |||||
* | Change normalization algorithm to `NKFC` and add docstring for this solution | Jan Rieger | 2020-04-17 | 1 | -1/+9 |
| | |||||
* | Use normal string literals instead of u-prefixed ones | Sviatoslav Sydorenko | 2020-04-17 | 1 | -2/+2 |
| | |||||
* | Add condition to prevent pass `filename*` when it's equal with original ↵ | Jan Rieger | 2020-04-17 | 1 | -2/+3 |
| | | | | `filename` | ||||
* | Rename `_utf8_content_disposition` to `_make_content_disposition` | Sviatoslav Sydorenko | 2020-04-17 | 1 | -3/+3 |
| | |||||
* | Improve the docstring of `_utf8_content_disposition` | Sviatoslav Sydorenko | 2020-04-17 | 1 | -3/+4 |
| | |||||
* | Use :rfc: sphinx role in docstrings | Sviatoslav Sydorenko | 2020-04-17 | 1 | -2/+2 |
| | |||||
* | Fix serving files with diacritics in name under their original name | Jan Rieger | 2020-04-17 | 1 | -8/+26 |
| | | | | | | | | | | | | This implements adding extra ``filename*`` parameter in Content-disposition header when serving content with non-ASCII filenames. As per RFC 6266 recommendations in the Appendix D. Refs: * https://stackoverflow.com/a/8996249/2173868 * https://tools.ietf.org/html/rfc6266#appendix-D Fixes #1776 | ||||
* | Revert "Fix serving files with diacritics in name under their original name" | Jan Rieger | 2020-04-17 | 1 | -26/+8 |
| | | | | This reverts commit 1741fd9adf70800fd692c24b0d85f5caad6a44e5. | ||||
* | Fix serving files with diacritics in name under their original name | Jan Rieger | 2020-04-17 | 1 | -8/+26 |
| | | | | | | | | | | | | This implements adding extra ``filename*`` parameter in Content-disposition header when serving content with non-ASCII filenames. As per RFC 6266 recommendations in the Appendix D. Refs: * https://stackoverflow.com/a/8996249/2173868 * https://tools.ietf.org/html/rfc6266#appendix-D Fixes #1776 | ||||
* | Merge branch 'master' into bugfix/1827-headermap-keytype | Jason R. Coombs | 2019-11-27 | 1 | -62/+3 |
|\ | |||||
| * | Revert "For now inline the implementation until it can be linked. Ref #1673." | Jason R. Coombs | 2019-11-26 | 1 | -62/+3 |
| | | | | | | | | This reverts commit 3bcefda0a5e397e12a6122fd8004cbbbce6a2b15. | ||||
* | | Reference the underlying issue. | Jason R. Coombs | 2019-11-27 | 1 | -1/+1 |
| | | |||||
* | | Avoid converting bytes in header keys to strings. Fixes #1827. | Jason R. Coombs | 2019-11-26 | 1 | -5/+6 |
|/ | |||||
* | Merge pull request #1715 from sanitec/cherrypy | Jason R. Coombs | 2019-11-03 | 1 | -3/+3 |
|\ | |||||
| * | Ensure 'Response Status' is text and data/ is bytes. Ref #1715. | Jason R. Coombs | 2019-11-03 | 1 | -2/+3 |
| | | |||||
| * | Inline the getattr operation | Jason R. Coombs | 2019-11-03 | 1 | -10/+2 |
| | | |||||
| * | cpstats: make 'Response Status' serializable | Stian Fosterud | 2018-06-18 | 1 | -3/+10 |
| | | | | | | | | | | | | | | | | Fixes an issue where it wasn't possible to fetch /cpstats/data when running the cpstats tool with Python3. Could potentially also solve the problem by supplying a default function for 'json.dumps', but this solution seems cleaner. | ||||
* | | Fix session tools indents @ cherrypy.lib.cptools | Jared | 2019-11-03 | 1 | -1/+1 |
| | | |||||
* | | Fix a few minor documentation warnings | Jay | 2019-11-03 | 1 | -11/+10 |
| | | | | | | | | | | | | | | | | Sphinx warnings fixed: * docs/advanced.rst:571: WARNING: Inline interpreted text or phrase reference start-string without end-string. * docs/advanced.rst:573: WARNING: Definition list ends without a blank line; unexpected unindent. * docs/basics.rst:4: WARNING: Duplicate explicit target name: "memcached". | ||||
* | | Merge branch 'master' into bugfix/1779 | Jason R. Coombs | 2019-09-03 | 3 | -4/+3 |
|\ \ | |||||
| * | | Use atomic dict copy to avoid changed while iter | Sviatoslav Sydorenko | 2019-08-18 | 3 | -4/+3 |
| | | | | | | | | | | | | | | | | | | Resolves #1805 Fixes #1803 Closes #1804 | ||||
* | | | Remove unused import | Suhaib Khan | 2019-07-03 | 1 | -1/+0 |
| | | | | | | | | | | | | Signed-off-by: Suhaib Khan <suheb.work@gmail.com> | ||||
* | | | Do not remove session lock files | Suhaib Khan | 2019-07-03 | 1 | -2/+0 |
|/ / | | | | | | | Signed-off-by: Suhaib Khan <suheb.work@gmail.com> | ||||
* | | Raise correct exception. Fixes linter warnings.v18.1.0 | Jason R. Coombs | 2018-12-09 | 1 | -4/+4 |
| | | |||||
* | | Adjust reprconf to match Python 3.8 changes | Sviatoslav Sydorenko | 2018-09-30 | 1 | -0/+2 |
| | | |||||
* | | Wipe out legacy unrepr builder targeting Python 2 | Sviatoslav Sydorenko | 2018-09-30 | 1 | -124/+5 |
| | | |||||
* | | Avoid hard-coded address in memcache sessions | Jason R. Coombs | 2018-09-09 | 1 | -1/+1 |
| | | |||||
* | | Don't convert bytes headers to str | Sviatoslav Sydorenko | 2018-09-05 | 1 | -1/+1 |
|\ \ | | | | | | | PR #1736 by @tobiashenkel | ||||
| * | | Don't convert bytes headers to str | Tobias Henkel | 2018-09-04 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | Don't convert bytes header values using str() as str(b'foo') becomes "b'foo'". Instead just leave bytes as is like it was prior to v18.0.0. | ||||
* | | | Remove references to threading._* in Python 3.2 and earlier. | Jason R. Coombs | 2018-09-04 | 1 | -3/+2 |
| | | | |||||
* | | | Use urllib.parse | Jason R. Coombs | 2018-09-04 | 1 | -1/+1 |
| | | | |||||
* | | | Move json from _cpcompat to its own module. | Jason R. Coombs | 2018-09-04 | 2 | -4/+5 |
|/ / | |||||
* | | Remove more references to six in doctest | Jason R. Coombs | 2018-09-02 | 1 | -5/+5 |
| | | |||||
* | | Remove reliance on contextlib2 | Jason R. Coombs | 2018-09-02 | 1 | -3/+2 |
| | | |||||
* | | Remove reliance on six | Jason R. Coombs | 2018-09-02 | 11 | -53/+31 |
| | | |||||
* | | Consolidate prepare_iter behavior | Jason R. Coombs | 2018-08-19 | 1 | -13/+24 |
| | | |||||
* | | Consolidate header item encoding. | Jason R. Coombs | 2018-08-19 | 1 | -14/+11 |
| | | |||||
* | | Reorder operations | Jason R. Coombs | 2018-08-19 | 1 | -3/+3 |
| | |