Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if headers are empty and then flush and get the headers again #179

Merged
merged 1 commit into from Feb 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions wp-cache-phase2.php
Expand Up @@ -122,6 +122,10 @@ function wp_cache_user_agent_is_rejected() {
function wp_cache_get_response_headers() {
if(function_exists('apache_response_headers')) {
$headers = apache_response_headers();
if ( empty( $headers ) ) {
flush();
$headers = apache_response_headers();
}
} else if(function_exists('headers_list')) {
$headers = array();
foreach(headers_list() as $hdr) {
Expand Down