mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
Force output buffers to be flushed, if they're turned on.
If output buffering is turned on, PHP can be a bit slack about sending the data to the client before closing the connection with exit(). These changes ensure we call ob_flush() before we leave. We call @ob_flush() so we don't get noisy warnings when output buffering is off...
This commit is contained in:
1 parent
c093419591
commit
b50b2d82ea
13 files changed
+24
-23
No files matched your search
@@ -113,7 +113,7 @@ class DAViCalSession extends Session
|
||||
|| (isset($c->restrict_admin_port) && $c->restrict_admin_port != $_SERVER['SERVER_PORT'] ) ) {
|
||||
header('Location: caldav.php');
|
||||
dbg_error_log( 'LOG WARNING', 'Access to "%s" via "%s:%d" rejected.', $_SERVER['REQUEST_URI'], $current_domain, $_SERVER['SERVER_PORT'] );
|
||||
exit(0);
|
||||
@ob_flush(); exit(0);
|
||||
}
|
||||
if ( isset($c->restrict_admin_roles) && $roles == '' ) $roles = $c->restrict_admin_roles;
|
||||
if ( $this->logged_in && $roles == '' ) return;
|
||||
@@ -156,7 +156,7 @@ class DAViCalSession extends Session
|
||||
}
|
||||
|
||||
include('page-footer.php');
|
||||
exit;
|
||||
@ob_flush(); exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user