Ver Fonte

Delete set header in fortunes (#5136)

by default send  Content-Type: text/html; charset=utf-8
Joan Miquel há 5 anos atrás
pai
commit
5c48119dd5

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

@@ -42,7 +42,7 @@ $http_worker->onMessage = static function ($connection) {
             return;
 
         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', 
                 static function ($command) use ($connection) {
                     $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());
 
         case '/fortune':
-            Http::header('Content-Type: text/html; charset=utf-8');
+            //Http::header('Content-Type: text/html; charset=utf-8');
             return $connection->send(fortune());
 
         case '/update':

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

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