summaryrefslogtreecommitdiff
path: root/cherrypy/lib/encoding.py
diff options
context:
space:
mode:
authorchbrown <none@none>2010-02-24 20:12:11 +0000
committerchbrown <none@none>2010-02-24 20:12:11 +0000
commit3cac4f1ca7238d10522f7470a7113f30391b424a (patch)
tree2d95ab2f575749c092862f63cbe008ec48c2744a /cherrypy/lib/encoding.py
parent72b6a24a8f41be5d6145aa5a7e08289582793a3f (diff)
downloadcherrypy-git-3cac4f1ca7238d10522f7470a7113f30391b424a.tar.gz
Sphinx docs in cherrypy.lib.*
Diffstat (limited to 'cherrypy/lib/encoding.py')
-rw-r--r--cherrypy/lib/encoding.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/cherrypy/lib/encoding.py b/cherrypy/lib/encoding.py
index 25a1bda6..97c6b278 100644
--- a/cherrypy/lib/encoding.py
+++ b/cherrypy/lib/encoding.py
@@ -20,13 +20,16 @@ def decode(encoding=None, default_encoding='utf-8'):
Either argument may be a single string or a list of strings.
- encoding: If not None, restricts the set of charsets attempted while decoding
- a request entity to the given set (even if a different charset is given in
- the Content-Type request header).
+ encoding
+ If not None, restricts the set of charsets attempted while decoding
+ a request entity to the given set (even if a different charset is given in
+ the Content-Type request header).
+
+ default_encoding
+ Only in effect if the 'encoding' argument is not given.
+ If given, the set of charsets attempted while decoding a request entity is
+ *extended* with the given value(s).
- default_encoding: Only in effect if the 'encoding' argument is not given.
- If given, the set of charsets attempted while decoding a request entity is
- *extended* with the given value(s).
"""
body = cherrypy.request.body
if encoding is not None:
@@ -293,6 +296,7 @@ def gzip(compress_level=5, mime_types=['text/html', 'text/plain'], debug=False):
* No 'gzip' or 'x-gzip' is present in the Accept-Encoding header
* No 'gzip' or 'x-gzip' with a qvalue > 0 is present
* The 'identity' value is given with a qvalue > 0.
+
"""
request = cherrypy.serving.request
response = cherrypy.serving.response