diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2018-02-04 13:11:20 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2018-02-04 13:44:14 -0500 |
commit | c314adc4deb7cd43aa985ce2541e39588e4098cb (patch) | |
tree | daedd192da82551b82846fa2ee052ba3422bc9ab /cherrypy/lib/static.py | |
parent | 513d4bfef99e7e599bc60c7da745d18439567797 (diff) | |
download | cherrypy-git-c314adc4deb7cd43aa985ce2541e39588e4098cb.tar.gz |
Use bytes literals where appropriatev14.0.0
Diffstat (limited to 'cherrypy/lib/static.py')
-rw-r--r-- | cherrypy/lib/static.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cherrypy/lib/static.py b/cherrypy/lib/static.py index ed6467a0..da9d9373 100644 --- a/cherrypy/lib/static.py +++ b/cherrypy/lib/static.py @@ -204,7 +204,7 @@ def _serve_fileobj(fileobj, content_type, content_length, debug=False): def file_ranges(): # Apache compatibility: - yield ntob('\r\n') + yield b'\r\n' for start, stop in r: if debug: @@ -223,12 +223,12 @@ def _serve_fileobj(fileobj, content_type, content_length, debug=False): gen = file_generator_limited(fileobj, stop - start) for chunk in gen: yield chunk - yield ntob('\r\n') + yield b'\r\n' # Final boundary yield ntob('--' + boundary + '--', 'ascii') # Apache compatibility: - yield ntob('\r\n') + yield b'\r\n' response.body = file_ranges() return response.body else: |