Browse Source

Delete set header in fortunes (#5136)

by default send  Content-Type: text/html; charset=utf-8
Joan Miquel 5 years ago
parent
commit
5c48119dd5

+ 1 - 1
frameworks/PHP/workerman/server-async.php

@@ -42,7 +42,7 @@ $http_worker->onMessage = static function ($connection) {
             return;
             return;
 
 
         case '/fortune':
         case '/fortune':
-            Http::header('Content-Type: text/html; charset=utf-8');
+            //Http::header('Content-Type: text/html; charset=utf-8');
             $mysql->query('SELECT id,message FROM Fortune', 
             $mysql->query('SELECT id,message FROM Fortune', 
                 static function ($command) use ($connection) {
                 static function ($command) use ($connection) {
                     $arr = $command->resultRows;
                     $arr = $command->resultRows;

+ 1 - 1
frameworks/PHP/workerman/server-mysqli.php

@@ -23,7 +23,7 @@ $http_worker->onMessage = static function ($connection) {
             return $connection->send(db());
             return $connection->send(db());
 
 
         case '/fortune':
         case '/fortune':
-            Http::header('Content-Type: text/html; charset=utf-8');
+            //Http::header('Content-Type: text/html; charset=utf-8');
             return $connection->send(fortune());
             return $connection->send(fortune());
 
 
         case '/update':
         case '/update':

+ 1 - 1
frameworks/PHP/workerman/server.php

@@ -35,7 +35,7 @@ $http_worker->onMessage = static function ($connection) {
             return $connection->send(dbraw());
             return $connection->send(dbraw());
 
 
         case '/fortune':
         case '/fortune':
-            Http::header('Content-Type: text/html; charset=utf-8');
+            //Http::header('Content-Type: text/html; charset=utf-8');
             return $connection->send(fortune());
             return $connection->send(fortune());
 
 
         case '/update':
         case '/update':