File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 8484// Remove any existing headers
8585header_remove ();
8686
87- // Use gz , if acceptable
88- ob_start ( ' ob_gzhandler ' );
87+ // Use zlib , if acceptable
88+ ini_set ( ' zlib.output_compression ' , $ zlib ?? ' On ' );
8989
9090// Output headers
9191$ header = substr ($ out , 0 , $ info ['header_size ' ]);
Original file line number Diff line number Diff line change 99];
1010
1111header_remove ();
12- ob_start ( ' ob_gzhandler ' );
12+ ini_set ( ' zlib.output_compression ' , ' On ' );
1313header ('Content-Type: application/json; charset=utf-8 ' );
1414header ('X-Test-Header: This header should come back through ' );
1515setcookie ('Test-Cookie ' , uniqid ());
1616session_name ('Test-Session ' );
1717session_start ();
1818
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