@@ -1099,7 +1099,7 @@ test "httpz: json response" {
1099
1099
try stream .writeAll ("GET /test/json HTTP/1.1\r \n Content-Length: 0\r \n \r \n " );
1100
1100
1101
1101
var buf : [200 ]u8 = undefined ;
1102
- try t .expectString ("HTTP/1.1 201 \r \n Content-Type: application/json\r \n Content-Length: 26\r \n \r \n {\" over\" :9000,\" teg\" :\" soup\" }" , testReadAll (stream , & buf ));
1102
+ try t .expectString ("HTTP/1.1 201 \r \n Content-Type: application/json; charset=UTF-8 \r \n Content-Length: 26\r \n \r \n {\" over\" :9000,\" teg\" :\" soup\" }" , testReadAll (stream , & buf ));
1103
1103
}
1104
1104
1105
1105
test "httpz: query" {
@@ -1359,7 +1359,7 @@ test "httpz: custom dispatch without action context" {
1359
1359
try stream .writeAll ("GET / HTTP/1.1\r \n Content-Length: 0\r \n \r \n " );
1360
1360
1361
1361
var buf : [200 ]u8 = undefined ;
1362
- try t .expectString ("HTTP/1.1 200 \r \n Content-Type: application/json\r \n dstate: 10\r \n dispatch: TestHandlerDispatch\r \n Content-Length: 12\r \n \r \n {\" state\" :10}" , testReadAll (stream , & buf ));
1362
+ try t .expectString ("HTTP/1.1 200 \r \n Content-Type: application/json; charset=UTF-8 \r \n dstate: 10\r \n dispatch: TestHandlerDispatch\r \n Content-Length: 12\r \n \r \n {\" state\" :10}" , testReadAll (stream , & buf ));
1363
1363
}
1364
1364
1365
1365
test "httpz: custom dispatch with action context" {
@@ -1368,7 +1368,7 @@ test "httpz: custom dispatch with action context" {
1368
1368
try stream .writeAll ("GET /?name=teg HTTP/1.1\r \n Content-Length: 0\r \n \r \n " );
1369
1369
1370
1370
var buf : [200 ]u8 = undefined ;
1371
- try t .expectString ("HTTP/1.1 200 \r \n Content-Type: application/json\r \n dstate: 20\r \n dispatch: TestHandlerDispatchContext\r \n Content-Length: 12\r \n \r \n {\" other\" :30}" , testReadAll (stream , & buf ));
1371
+ try t .expectString ("HTTP/1.1 200 \r \n Content-Type: application/json; charset=UTF-8 \r \n dstate: 20\r \n dispatch: TestHandlerDispatchContext\r \n Content-Length: 12\r \n \r \n {\" other\" :30}" , testReadAll (stream , & buf ));
1372
1372
}
1373
1373
1374
1374
test "httpz: custom handle" {
0 commit comments