From 6169ea259af8674443e8d2cd2ece3b5e8d1b8a4b Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Mon, 17 Apr 2006 21:04:47 +0000 Subject: [PATCH] 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. --- mod/chat/gui_header_js/users.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mod/chat/gui_header_js/users.php b/mod/chat/gui_header_js/users.php index 16474bea3545e..159fcde791e2d 100644 --- a/mod/chat/gui_header_js/users.php +++ b/mod/chat/gui_header_js/users.php @@ -99,6 +99,10 @@ function update() { /// 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 @@ function update() { echo ''; } echo ''; + + // support HTTP Keep-Alive + header("Content-Length: " . ob_get_length() ); + ob_end_flush(); + exit; // no further output + + ?>