aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPjotr Prins2016-10-03 06:59:08 +0000
committerPjotr Prins2016-10-03 06:59:08 +0000
commite7e1fbfda99c47bbe547b11c926831e523a37147 (patch)
tree8a124bc0d9642dff3a1e60ac3d812958b2a4672d
parent2115fcfde74375252f556153d48f52f4d15fb298 (diff)
downloadgenenetwork2-e7e1fbfda99c47bbe547b11c926831e523a37147.tar.gz
Error page: reduce cookie size
-rw-r--r--wqflask/wqflask/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wqflask/wqflask/views.py b/wqflask/wqflask/views.py
index cf316bee..33fab84d 100644
--- a/wqflask/wqflask/views.py
+++ b/wqflask/wqflask/views.py
@@ -103,7 +103,7 @@ def handle_bad_request(e):
# Handle random animations
# Use a cookie to have one animation on refresh
- animation = request.cookies.get(err_msg[:64])
+ animation = request.cookies.get(err_msg[:32])
if not animation:
list = [fn for fn in os.listdir("./wqflask/static/gif/error") if fn.endswith(".gif") ]
animation = random.choice(list)
@@ -111,7 +111,7 @@ def handle_bad_request(e):
resp = make_response(render_template("error.html",message=err_msg,stack=formatted_lines,error_image=animation))
# logger.error("Set cookie %s with %s" % (err_msg, animation))
- resp.set_cookie(err_msg[:64],animation)
+ resp.set_cookie(err_msg[:32],animation)
return resp
@app.route("/")