@@ -1111,7 +1111,7 @@ test "httpz: json response" {
1111
1111
try stream .writeAll ("GET /test/json HTTP/1.1\r \n Content-Length: 0\r \n \r \n " );
1112
1112
1113
1113
var buf : [200 ]u8 = undefined ;
1114
- 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 ));
1114
+ 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 ));
1115
1115
}
1116
1116
1117
1117
test "httpz: query" {
@@ -1371,7 +1371,7 @@ test "httpz: custom dispatch without action context" {
1371
1371
try stream .writeAll ("GET / HTTP/1.1\r \n Content-Length: 0\r \n \r \n " );
1372
1372
1373
1373
var buf : [200 ]u8 = undefined ;
1374
- 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 ));
1374
+ 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 ));
1375
1375
}
1376
1376
1377
1377
test "httpz: custom dispatch with action context" {
@@ -1380,7 +1380,7 @@ test "httpz: custom dispatch with action context" {
1380
1380
try stream .writeAll ("GET /?name=teg HTTP/1.1\r \n Content-Length: 0\r \n \r \n " );
1381
1381
1382
1382
var buf : [200 ]u8 = undefined ;
1383
- 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 ));
1383
+ 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 ));
1384
1384
}
1385
1385
1386
1386
test "httpz: custom handle" {
0 commit comments