]> git.wh0rd.org Git - tt-rss.git/commitdiff
use text/json content-type in a few more places
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 12 Jan 2013 12:02:37 +0000 (16:02 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Sat, 12 Jan 2013 12:02:37 +0000 (16:02 +0400)
backend.php

index e718f8103ebd639428488fab24f7aaf513197c7a..98b76450faffb3684918086144be13b3e112314c 100644 (file)
@@ -53,7 +53,7 @@
 
        if (!init_connection($link)) return;
 
-       header("Content-Type: text/plain; charset=utf-8");
+       header("Content-Type: text/json; charset=utf-8");
 
        if (ENABLE_GZIP_OUTPUT && function_exists("ob_gzhandler")) {
                ob_start("ob_gzhandler");
                                        $handler->after();
                                        return;
                                } else {
-                                       header("Content-Type: text/plain");
+                                       header("Content-Type: text/json");
                                        print json_encode(array("error" => array("code" => 6)));
                                        return;
                                }
                        } else {
-                               header("Content-Type: text/plain");
+                               header("Content-Type: text/json");
                                print json_encode(array("error" => array("code" => 6)));
                                return;
                        }
                }
        }
 
-       header("Content-Type: text/plain");
+       header("Content-Type: text/json");
        print json_encode(array("error" => array("code" => 7)));
 
        // We close the connection to database.