1.1 --- a/WebStack/ModPython.py Sat Apr 24 16:59:49 2004 +0000
1.2 +++ b/WebStack/ModPython.py Sat Apr 24 17:00:32 2004 +0000
1.3 @@ -180,6 +180,18 @@
1.4
1.5 return Cookie.get_cookies(self.trans)
1.6
1.7 + def get_cookie(self, cookie_name):
1.8 +
1.9 + """
1.10 + A framework-specific method which obtains cookie information from the
1.11 + request.
1.12 +
1.13 + Returns a cookie object for the given 'cookie_name' or None if no such
1.14 + cookie exists.
1.15 + """
1.16 +
1.17 + return self.get_cookies().get(cookie_name)
1.18 +
1.19 # Response-related methods.
1.20
1.21 def get_response_stream(self):
1.22 @@ -250,6 +262,8 @@
1.23 time.time function, and indicates the expiry date/time of the cookie.
1.24 """
1.25
1.26 + # NOTE: We just hope that Cookie converts Unicode arguments to US-ASCII.
1.27 +
1.28 if Cookie:
1.29 cookie = Cookie.Cookie(name, value)
1.30 if expires is not None: