From: martinlanghoff Date: Mon, 17 Apr 2006 21:04:47 +0000 (+0000) Subject: mod/chat - Normal method now supports HTTP Keep-Alive - users pane X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6169ea259af8674443e8d2cd2ece3b5e8d1b8a4b;p=moodle.git 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. --- diff --git a/mod/chat/gui_header_js/users.php b/mod/chat/gui_header_js/users.php index 16474bea35..159fcde791 100644 --- a/mod/chat/gui_header_js/users.php +++ b/mod/chat/gui_header_js/users.php @@ -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 ''; } echo ''; + + // support HTTP Keep-Alive + header("Content-Length: " . ob_get_length() ); + ob_end_flush(); + exit; // no further output + + ?>