]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Fix issues with NGINX: notifications, user list, server ban list.
authorBram Matthys <redacted>
Tue, 25 Apr 2023 06:27:23 +0000 (08:27 +0200)
committerBram Matthys <redacted>
Tue, 25 Apr 2023 06:28:04 +0000 (08:28 +0200)
Basically all the API calls that used common_api.php. Reported by Nini.

api/common_api.php

index 95f71269a65a984550cb5a114055e0b53dc2f0f6..7173977ff6b5da3a3f4b53778f4a6cf10ac798bf 100644 (file)
@@ -29,12 +29,8 @@ set_time_limit(0);
 // Send content immediately
 ob_implicit_flush(1);
 
-// Eh.. yeah...
-ob_end_flush();
-
-// If we use fastcgi, then finish the request now (UNTESTED)
-if (function_exists('fastcgi_finish_request'))
-       fastcgi_finish_request();
+// Flush and stop output buffering (eg fastcgi w/NGINX)
+while (@ob_end_flush());
 
 /* Send server-sent events (SSE) message */
 function send_sse($json)