summaryrefslogtreecommitdiff
path: root/cherrypy
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-12-03 09:12:53 -0500
committerJason R. Coombs <jaraco@jaraco.com>2017-12-03 09:12:53 -0500
commitd6a507ced632d807574b10b73a53e10a951c3711 (patch)
tree5bc5452b1e1db8f8c195767eaf7f4fe4675e5b27 /cherrypy
parent9d95d406e0a5e4566b82c2dbdce93b14a2912e0a (diff)
downloadcherrypy-git-12.0.2.tar.gz
Simply render the CookieError message in the response. Fixes #1665.v12.0.2
Diffstat (limited to 'cherrypy')
-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