File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 84
84
// Remove any existing headers
85
85
header_remove ();
86
86
87
- // Use gz , if acceptable
88
- ob_start ( ' ob_gzhandler ' );
87
+ // Use zlib , if acceptable
88
+ ini_set ( ' zlib.output_compression ' , $ zlib ?? ' On ' );
89
89
90
90
// Output headers
91
91
$ header = substr ($ out , 0 , $ info ['header_size ' ]);
Original file line number Diff line number Diff line change 9
9
];
10
10
11
11
header_remove ();
12
- ob_start ( ' ob_gzhandler ' );
12
+ ini_set ( ' zlib.output_compression ' , ' On ' );
13
13
header ('Content-Type: application/json; charset=utf-8 ' );
14
14
header ('X-Test-Header: This header should come back through ' );
15
15
setcookie ('Test-Cookie ' , uniqid ());
16
16
session_name ('Test-Session ' );
17
17
session_start ();
18
18
19
- echo json_encode ($ info , JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK | JSON_FORCE_OBJECT );
19
+ echo json_encode (array_filter ( $ info) , JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK | JSON_FORCE_OBJECT );
You can’t perform that action at this time.
0 commit comments