summaryrefslogtreecommitdiff
path: root/cherrypy/_cprequest.py
diff options
context:
space:
mode:
Diffstat (limited to 'cherrypy/_cprequest.py')
-rw-r--r--cherrypy/_cprequest.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/cherrypy/_cprequest.py b/cherrypy/_cprequest.py
index ed404d7b..ddff3669 100644
--- a/cherrypy/_cprequest.py
+++ b/cherrypy/_cprequest.py
@@ -731,9 +731,8 @@ class Request(object):
if name == 'Cookie':
try:
self.cookie.load(value)
- except CookieError:
- msg = 'Illegal cookie name %s' % value.split('=')[0]
- raise cherrypy.HTTPError(400, msg)
+ except CookieError as exc:
+ raise cherrypy.HTTPError(400, str(exc))
if not dict.__contains__(headers, 'Host'):
# All Internet-based HTTP/1.1 servers MUST respond with a 400