]> git.mjollnir.org Git - moodle.git/commitdiff
mod/chat - Normal method now supports HTTP Keep-Alive - users pane
authormartinlanghoff <martinlanghoff>
Mon, 17 Apr 2006 21:04:47 +0000 (21:04 +0000)
committermartinlanghoff <martinlanghoff>
Mon, 17 Apr 2006 21:04:47 +0000 (21:04 +0000)
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

index 16474bea3545e4579d0db911819e9050b8e2a4f8..159fcde791e2d4a92f007debc5086219489be52a 100644 (file)
 
     /// Print headers
     $meta = ob_get_clean();
+
+
+    // Use ob to support Keep-Alive
+    ob_start();
     print_header('', '', '', '', $meta, false, '', '', false, 'onload="start()" onunload="stop()"');
 
 
         echo '<td></tr>';
     }
     echo '</table></body></html>';
+
+    // support HTTP Keep-Alive
+    header("Content-Length: " . ob_get_length() );
+    ob_end_flush();
+    exit; // no further output
+
+
 ?>