diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2015-09-29 18:09:38 +0200 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2015-09-29 18:09:38 +0200 |
| commit | caf85faa1c62eaea0d9a614ff9e8283e60af9d33 (patch) | |
| tree | 0291d024564742eef2393918e76d491d159afd7b /static | |
| parent | 043967a00987a840dffb3a5845246e5eef5a033b (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')
| -rwxr-xr-x | static/classes/Response.class.php | 3 |
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; |
