summaryrefslogtreecommitdiff
path: root/paste/request.py
diff options
context:
space:
mode:
authorbbangert <devnull@localhost>2006-03-09 02:36:56 +0000
committerbbangert <devnull@localhost>2006-03-09 02:36:56 +0000
commit2b1951c2454d88d912e6a42b13c796786b683449 (patch)
treea880017a9bca1eb5a7a8fc10ff774934e1bbcd34 /paste/request.py
parent9f1d5b07ae899c7fc33cceda9da7754eab787c36 (diff)
downloadpaste-2b1951c2454d88d912e6a42b13c796786b683449.tar.gz
Added cookies and urlvars to WSGIRequest
Diffstat (limited to 'paste/request.py')
-rw-r--r--paste/request.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/paste/request.py b/paste/request.py
index e6284ee..45a4db3 100644
--- a/paste/request.py
+++ b/paste/request.py
@@ -394,7 +394,7 @@ class WSGIRequest(object):
Most values are strings, but file uploads can be FieldStorage
objects. If this is not a POST request, or the body is not
- encoded fields (e.g., an XMLRPC request) then this will be None.
+ encoded fields (e.g., an XMLRPC request) then this will be empty.
This will consume wsgi.input when first accessed if applicable,
but the output will be put in environ['paste.post_vars']
@@ -415,8 +415,8 @@ class WSGIRequest(object):
Additional methods supported:
getlist(key)
- Returns a list keyed by parameter location of all the values by
- that key in that parameter location
+ Returns a list of all the values by that key, collected from
+ POST, GET, URL dicts
"""
pms = MultiDict()
pms.update(self.post)
@@ -437,9 +437,14 @@ class WSGIRequest(object):
"""Dictionary of cookies keyed by cookie name.
Just a plain dictionary, may be empty but not None.
-
+
"""
- pass
+ fresh_cookies = get_cookies(self.environ)
+ cookie_dict = {}
+ for k, morsel in fresh_cookies.iteritems():
+ cookie_dict[k] = morsel.value
+ return cookie_dict
+ cookies = property(LazyCache(cookies), doc=cookies.__doc__)
def headers(self):
"""Access to incoming headers"""