summaryrefslogtreecommitdiff
path: root/static/classes
diff options
context:
space:
mode:
authorJuuso Lapinlampi <wub@partyvan.eu>2015-09-29 18:09:38 +0200
committerJuuso Lapinlampi <wub@partyvan.eu>2015-09-29 18:09:38 +0200
commitcaf85faa1c62eaea0d9a614ff9e8283e60af9d33 (patch)
tree0291d024564742eef2393918e76d491d159afd7b /static/classes
parent043967a00987a840dffb3a5845246e5eef5a033b (diff)
Return Content-Type: text/csv with csv upload output
Previously, CSV would return the wrong filetype text/plain and fallthrough. RFC 4180 registers text/csv MIME type. RFC 7111 is closely related and says to use text/csv to launch the correct application.
Diffstat (limited to 'static/classes')
-rwxr-xr-xstatic/classes/Response.class.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php
index 3afcfdb..a83cb6a 100755
--- a/static/classes/Response.class.php
+++ b/static/classes/Response.class.php
@@ -31,6 +31,9 @@ class Response
{
switch ($response_type) {
case 'csv':
+ header('Content-Type: text/csv; charset=UTF-8');
+ $this->type = $response_type;
+ break;
case 'gyazo':
header('Content-Type: text/plain; charset=UTF-8');
$this->type = $response_type;