From caf85faa1c62eaea0d9a614ff9e8283e60af9d33 Mon Sep 17 00:00:00 2001 From: Juuso Lapinlampi Date: Tue, 29 Sep 2015 16:09:38 +0000 Subject: 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. --- static/classes/Response.class.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'static') 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; -- cgit v1.2.3