summaryrefslogtreecommitdiff
path: root/addons/website/data
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2019-04-26 10:55:32 +0000
committerSébastien Theys <seb@odoo.com>2019-04-29 13:45:34 +0000
commit7d3fe51100302f2c1af00a343c17940e530b4dbf (patch)
treefa0d7650e503394b1627ec2124bb80385ee4daf3 /addons/website/data
parent09ff05ba45d08f980f1b55c23b24420f78e9a943 (diff)
[FIX] http,web,website_*: return the correct Content-Type for images
* = website_profile, website_slides Before this commit, the returned Content-Type was not always correct, for example if the image tool was changing the format, which happens when given a BMP (converted to PNG), or other types being converted to JPEG. The previous method `force_contenttype` was too specific and it wasn't available in every controller. It didn't even need to be a controller method because it didn't use self. Now we create a generic helper to ease updating headers. The Content-Type is only updated when it is safe to do. It is especially unsafe for example for SVG files. task-1958000 PR: #31811
Diffstat (limited to 'addons/website/data')
0 files changed, 0 insertions, 0 deletions