Skip to content
Extraits de code Groupes Projets
Valider fd0d4eaa rédigé par robocoder's avatar robocoder
Parcourir les fichiers

consistency in response headers

git-svn-id: http://dev.piwik.org/svn/trunk@2216 59fd770c-687e-43c8-a1e3-f5a4ff64c105
parent 70bedbab
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -119,7 +119,7 @@ class Piwik_API_ResponseBuilder
"</result>";
break;
case 'json':
@header( "Content-type: application/json" );
@header( "Content-Type: application/json" );
// we remove the \n from the resulting string as this is not allowed in json
$message = str_replace("\n","",$message);
$return = '{"result":"error", "message":"'.$message.'"}';
......@@ -230,7 +230,7 @@ class Piwik_API_ResponseBuilder
"</result>";
break;
case 'json':
@header( "Content-type: application/json" );
@header( "Content-Type: application/json" );
$return = '{"result":"success", "message":"'.$message.'"}';
break;
case 'php':
......@@ -242,7 +242,7 @@ class Piwik_API_ResponseBuilder
break;
case 'csv':
header("Content-type: application/vnd.ms-excel");
header("Content-Type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=piwik-report-export.csv");
$return = "message\n".$message;
break;
......
......@@ -258,7 +258,7 @@ class Piwik_DataTable_Renderer_Csv extends Piwik_DataTable_Renderer
return 'No data available';
}
// silent fail otherwise unit tests fail
@header("Content-type: application/vnd.ms-excel");
@header("Content-Type: application/vnd.ms-excel");
@header("Content-Disposition: attachment; filename=piwik-report-export.csv");
if($this->convertToUnicode
&& function_exists('mb_convert_encoding'))
......
......@@ -89,7 +89,7 @@ abstract class Piwik_ViewDataTable_GenerateGraphData extends Piwik_ViewDataTable
if (!Zend_Registry::get('config')->General->serve_widget_and_data)
{
@header( "Content-type: application/json" );
@header( "Content-Type: application/json" );
}
// Graphs require the full dataset, setting limit to null (same as 'no limit')
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter