Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 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. | ||||
* | | Use urllib.parse | Jason R. Coombs | 2018-09-04 | 1 | -1/+1 |
|/ | |||||
* | Remove more references to six in doctest | Jason R. Coombs | 2018-09-02 | 1 | -5/+5 |
| | |||||
* | Remove reliance on six | Jason R. Coombs | 2018-09-02 | 1 | -17/+12 |
| | |||||
* | Consolidate header item encoding. | Jason R. Coombs | 2018-08-19 | 1 | -14/+11 |
| | |||||
* | Reorder operations | Jason R. Coombs | 2018-08-19 | 1 | -3/+3 |
| | |||||
* | Use 'string_types' when encoding headers. | Jason R. Coombs | 2018-08-19 | 1 | -3/+2 |
| | |||||
* | Replace the one use of unquote_qs with invocations of the stdlib functions. | Jason R. Coombs | 2018-08-13 | 1 | -3/+3 |
| | |||||
* | Fail with HTTP 400 for invalid headers | Sviatoslav Sydorenko | 2018-05-28 | 1 | -1/+16 |
| | | | | | | | | | | Test malformed Accept-Charset quality values. Fixes #1370 Closes #1707 Co-authored-by: Zach Seils (seils) <seils@cisco.com> Co-authored-by: Zach Seils <zachseils@gmail.com> | ||||
* | Use bytes literals where appropriatev14.0.0 | Jason R. Coombs | 2018-02-04 | 1 | -5/+5 |
| | |||||
* | Merge branch 'master' into feature/reuse-case-insensitive-dict | Jason R. Coombs | 2017-12-17 | 1 | -11/+10 |
|\ | |||||
| * | Get cmp from builtins | Jason R. Coombs | 2017-10-29 | 1 | -4/+4 |
| | | |||||
| * | Honor E302 | Jason R. Coombs | 2017-10-29 | 1 | -1/+3 |
| | | |||||
| * | Regarding E305, honor the style guide rather than suppressing errors. | Jason R. Coombs | 2017-10-29 | 1 | -1/+2 |
| | | |||||
| * | Python2.7 exposes header module as email.header | Jason R. Coombs | 2017-10-28 | 1 | -5/+1 |
| | | |||||
* | | For now inline the implementation until it can be linked. Ref #1673. | Jason R. Coombs | 2017-12-17 | 1 | -3/+62 |
| | | |||||
* | | Use jaraco.collections for code re-use on CaseInsensitiveDict. Fixes #1231. | Jason R. Coombs | 2017-10-28 | 1 | -37/+6 |
|/ | |||||
* | Remove long-deprecated legacy 'has_any' methods on mappings. | Jason R. Coombs | 2017-10-28 | 1 | -4/+0 |
| | |||||
* | Add doctest for cherrypy.lib.httputil.valid_status | Sviatoslav Sydorenko | 2017-10-20 | 1 | -0/+7 |
| | |||||
* | Refactor docstring of cp.lib.httputil.valid_status | Sviatoslav Sydorenko | 2017-10-20 | 1 | -3/+4 |
| | |||||
* | Improve invalid status checks | Sviatoslav Sydorenko | 2017-10-20 | 1 | -1/+1 |
| | |||||
* | Fix for http.client status codes. | Aric Coady | 2017-10-19 | 1 | -9/+4 |
| | |||||
* | Create function for conditionally decoding the text | Jason R. Coombs | 2017-09-26 | 1 | -0/+7 |
| | |||||
* | Convert doc to doctest | Jason R. Coombs | 2017-09-26 | 1 | -1/+6 |
| | |||||
* | Mark docstrings with slash escaping as raw str (PR #1610 by @scop) | Ville Skyttä | 2017-07-10 | 1 | -1/+1 |
| | | | | * https://docs.python.org/3/whatsnew/3.6.html#deprecated-python-behavior (Python 3.6 invalid escape sequence deprecation) | ||||
* | Just use range as if on Python 3 | Jason R. Coombs | 2017-07-09 | 1 | -2/+3 |
| | |||||
* | Use six for http imports | Jason R. Coombs | 2017-07-09 | 1 | -1/+2 |
| | |||||
* | Remove 'sorted' and 'reversed' from _cp_compat | Jason R. Coombs | 2017-07-09 | 1 | -1/+1 |
| | |||||
* | Replace iteritems with six usage. | Jason R. Coombs | 2017-07-08 | 1 | -2/+2 |
| | |||||
* | PEP8fy codebase: eliminated F821 flake8 error | Sviatoslav Sydorenko | 2017-03-12 | 1 | -5/+5 |
| | |||||
* | PEP8fy codebase: eliminated E111 flake8 error | Sviatoslav Sydorenko | 2017-03-11 | 1 | -2/+2 |
| | |||||
* | PEP8fy codebase: eliminated E302 flake8 error | Sviatoslav Sydorenko | 2017-03-11 | 1 | -1/+1 |
| | |||||
* | PEP8fy codebase: eliminated E305 flake8 error | Sviatoslav Sydorenko | 2017-03-11 | 1 | -1/+1 |
| | |||||
* | fixed a bunch of documentation warnings | Rick van Hattem | 2017-02-07 | 1 | -1/+1 |
| | |||||
* | Convert all strings to conform single-quoted style | Sviatoslav Sydorenko | 2016-09-08 | 1 | -33/+33 |
| | | | | pre-commit run double-quote-string-fixer --all-files | ||||
* | Fix E402 in lib/httputil | Sviatoslav Sydorenko | 2016-09-08 | 1 | -8/+8 |
| | |||||
* | Use decorators where appropriate. | Jason R. Coombs | 2016-08-03 | 1 | -7/+8 |
| | |||||
* | Use the preferred name text_or_bytes to avoid conflation with 'basestring' ↵ | Jason R. Coombs | 2016-07-24 | 1 | -2/+2 |
| | | | | which has no equivalent on Python 3. | ||||
* | Use correct, but poorly-named parameter. | Jason R. Coombs | 2016-07-24 | 1 | -1/+1 |
| | |||||
* | Move HTTPDate to httputil, where it's actually exposed. | Jason R. Coombs | 2016-07-24 | 1 | -1/+6 |
| | |||||
* | Replaced 'unicodestr' with 'six.text_type' | Jason R. Coombs | 2016-06-05 | 1 | -4/+6 |
| | |||||
* | Remove use of bytestr and nativestr, which can be represented by 'bytes' and ↵ | Jason R. Coombs | 2016-06-05 | 1 | -2/+2 |
| | | | | 'str' respectively now that Python 2.5 is not supported. | ||||
* | Fix for issue #1397 | Jürn Brodersen | 2016-06-05 | 1 | -16/+2 |
| | |||||
* | Replace references to bitbucket tickets with references to github tickets. ↵ | Jason R. Coombs | 2016-04-30 | 1 | -1/+1 |
| | | | | Ref #1410. | ||||
* | Fixing HTTP range headers for negative length larger than content size. | Philip Zeyliger | 2014-07-28 | 1 | -1/+8 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the RFC, clients are allows to request the "last N bytes", even if N is actually larger than the content size. Here's the relevant section: RFC 2616 Section 14.35.1: If the entity is shorter than the specified suffix-length, the entire entity-body is used. httpd follows this just fine. test.txt is only 11 bytes long, but if we request 500 bytes, we do fine: $ curl http://www.sf.cloudera.com/~philip/test.txt -r -500 -v > GET /~philip/test.txt HTTP/1.1 > Range: bytes=-500 > User-Agent: curl/7.30.0 > Host: www.sf.cloudera.com > Accept: */* > < HTTP/1.1 206 Partial Content < Date: Fri, 25 Jul 2014 23:31:39 GMT < Server: Apache/2.2.15 (CentOS) < Last-Modified: Fri, 25 Jul 2014 23:14:01 GMT < ETag: "221772d-b-4ff0cba900ab6" < Accept-Ranges: bytes < Content-Length: 11 < Content-Range: bytes 0-10/11 < Connection: close < Content-Type: text/plain; charset=UTF-8 < 1234567890 However, cherrypy would fail in this case. $curl -v http://localhost:8080/test.txt -r -100 > GET /test.txt HTTP/1.1 > Range: bytes=-100 > User-Agent: curl/7.30.0 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 500 Internal Server Error < Content-Length: 1104 < Server: CherryPy/3.5.1 < Date: Mon, 28 Jul 2014 16:22:11 GMT < Content-Type: text/html;charset=utf-8 < [...] <title>500 Internal Server Error</title> [...] <pre id="traceback">Traceback (most recent call last): File "/Users/philip/src/cherrypy/cherrypy/_cprequest.py", line 667, in respond self.hooks.run('before_handler') File "/Users/philip/src/cherrypy/cherrypy/_cprequest.py", line 114, in run raise exc IOError: [Errno 22] Invalid argument [...] With this commit, cherrypy now works fine: $curl -v http://localhost:8080/test.txt -r -100 > GET /test.txt HTTP/1.1 > Range: bytes=-100 > User-Agent: curl/7.30.0 > Host: localhost:8080 > Accept: */* > < HTTP/1.1 206 Partial Content < Content-Length: 11 < Accept-Ranges: bytes < Server: CherryPy/3.5.1 < Last-Modified: Mon, 28 Jul 2014 16:20:47 GMT < Content-Range: bytes 0-10/11 < Date: Mon, 28 Jul 2014 16:25:46 GMT < Content-Type: text/plain < 0123456789 The above is run with the below minimalist script. import cherrypy import os class X(object): pass if __name__ == '__main__': conf = { '/': { 'tools.staticdir.on': True, 'tools.staticdir.root': os.path.abspath(os.getcwd()), 'tools.staticdir.dir': './' } } cherrypy.quickstart(X(), '/', conf) I've added a simple test to check this case and have run it with "nosetests -s test/test_core.py". | ||||
* | Although already fixed, use the submitted regular expression to simplify ↵ | Allan Crooks | 2014-04-16 | 1 | -34/+2 |
| | | | | | | | code to correctly parse headers which have quotas in their field value. Fixes #1079. Simplified code submitted by holm@podio.com. This ticket is linked to #1146. | ||||
* | Don't split headers on commas contained between quotes. Fixes #1146. | Allan Crooks | 2014-04-15 | 1 | -1/+33 |
| | |||||
* | More PEP8 work. | Gustavo Picon | 2014-01-12 | 1 | -4/+6 |
| | |||||
* | Running: autopep8 -vvvvv -i `find . -name '*.py'` | Gustavo Picon | 2014-01-12 | 1 | -10/+25 |
| | | | | | --HG-- branch : autopep8 |