Maurits van der Schee 4 år sedan
förälder
incheckning
e2524bee3c
3 ändrade filer med 4 tillägg och 4 borttagningar
  1. 2
    2
      api.php
  2. 1
    1
      src/Tqdev/PhpCrudApi/ResponseFactory.php
  3. 1
    1
      src/index.php

+ 2
- 2
api.php Visa fil

@@ -11123,7 +11123,7 @@ namespace Tqdev\PhpCrudApi {
11123 11123
             $stream = $psr17Factory->createStream($content);
11124 11124
             $stream->rewind();
11125 11125
             $response = $response->withBody($stream);
11126
-            $response = $response->withHeader('Content-Type', $contentType);
11126
+            $response = $response->withHeader('Content-Type', $contentType . '; charset=utf-8');
11127 11127
             $response = $response->withHeader('Content-Length', strlen($content));
11128 11128
             return $response;
11129 11129
         }
@@ -11201,7 +11201,7 @@ namespace Tqdev\PhpCrudApi {
11201 11201
         'username' => 'php-crud-api',
11202 11202
         'password' => 'php-crud-api',
11203 11203
         'database' => 'php-crud-api',
11204
-        // d'debug' => false
11204
+        // 'debug' => false
11205 11205
     ]);
11206 11206
     $request = RequestFactory::fromGlobals();
11207 11207
     $api = new Api($config);

+ 1
- 1
src/Tqdev/PhpCrudApi/ResponseFactory.php Visa fil

@@ -45,7 +45,7 @@ class ResponseFactory
45 45
         $stream = $psr17Factory->createStream($content);
46 46
         $stream->rewind();
47 47
         $response = $response->withBody($stream);
48
-        $response = $response->withHeader('Content-Type', $contentType);
48
+        $response = $response->withHeader('Content-Type', $contentType . '; charset=utf-8');
49 49
         $response = $response->withHeader('Content-Length', strlen($content));
50 50
         return $response;
51 51
     }

+ 1
- 1
src/index.php Visa fil

@@ -15,7 +15,7 @@ $config = new Config([
15 15
     'username' => 'php-crud-api',
16 16
     'password' => 'php-crud-api',
17 17
     'database' => 'php-crud-api',
18
-    // d'debug' => false
18
+    // 'debug' => false
19 19
 ]);
20 20
 $request = RequestFactory::fromGlobals();
21 21
 $api = new Api($config);

Loading…
Avbryt
Spara