From ccbfa94d32158b8df383df54f3eced38e602e5ef Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 12 Jul 2018 10:04:21 +0200 Subject: [PATCH] [FIX] the ; in content-disposition is a separator not a terminator According to RFC 6266, content-disposition = "Content-Disposition" ":" disposition-type *( ";" disposition-parm ) disposition-parm can't be an empty string, and thus a ; in terminal position is not legal, even though browsers apparently work around it. --- addons/web/controllers/pivot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/controllers/pivot.py b/addons/web/controllers/pivot.py index 3aebfe3946b..e2ffbfbaa31 100644 --- a/addons/web/controllers/pivot.py +++ b/addons/web/controllers/pivot.py @@ -81,7 +81,7 @@ class TableExporter(http.Controller): response = request.make_response(None, headers=[('Content-Type', 'application/vnd.ms-excel'), - ('Content-Disposition', 'attachment; filename=table.xls;')], + ('Content-Disposition', 'attachment; filename=table.xls')], cookies={'fileToken': token}) workbook.save(response.stream)