diff --git a/pages/debug.mako b/pages/debug.mako
index c7ed5e0..1891a15 100644
--- a/pages/debug.mako
+++ b/pages/debug.mako
@@ -3,6 +3,8 @@
% for key, value in environ.items():
% if key not in ["wsgi.input", "wsgi.errors", "PATH"]:
${key}: ${value}
+ % elif key == "wsgi.input":
+ ${key}: ${value.read(environ.get("CONTENT_LENGTH", 0))}
% endif
% endfor
diff --git a/toolserver/cookies.py b/toolserver/cookies.py
index a4cd6bc..4362533 100644
--- a/toolserver/cookies.py
+++ b/toolserver/cookies.py
@@ -26,7 +26,7 @@ class _CookieManager(SimpleCookie):
def value_encode(self, value):
encoded = base64.b64encode(value.encode("utf8"))
quoted = super(_CookieManager, self).value_encode(encoded)[1]
- return value, encoded
+ return value, quoted
@property
def path(self):