mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 20:53:53 +01:00
mod/chat - Normal method now supports HTTP Keep-Alive - users pane
User's pane now also uses keepalives -- if the refresh freq is below the disconnect timeout, then it is a win. Otherwise it wastes memory at the server end.
This commit is contained in:
parent
dfd1d9e272
commit
6169ea259a
@ -99,6 +99,10 @@
|
||||
|
||||
/// Print headers
|
||||
$meta = ob_get_clean();
|
||||
|
||||
|
||||
// Use ob to support Keep-Alive
|
||||
ob_start();
|
||||
print_header('', '', '', '', $meta, false, '', '', false, 'onload="start()" onunload="stop()"');
|
||||
|
||||
|
||||
@ -129,4 +133,11 @@
|
||||
echo '<td></tr>';
|
||||
}
|
||||
echo '</table></body></html>';
|
||||
|
||||
// support HTTP Keep-Alive
|
||||
header("Content-Length: " . ob_get_length() );
|
||||
ob_end_flush();
|
||||
exit; // no further output
|
||||
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user