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

Improve header WP-Super-Cache #100

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion wp-cache-phase1.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,16 @@ function wp_cache_serve_cache_file() {

header( "Vary: Accept-Encoding, Cookie" );
header( "Cache-Control: max-age=3, must-revalidate" );
header( "WP-Super-Cache: Served supercache file from PHP" );
$size = function_exists( 'mb_strlen' ) ? mb_strlen( $cachefiledata, '8bit' ) : strlen( $cachefiledata );
if ( $wp_cache_gzip_encoding ) {
header( "WP-Super-Cache: Served supercache gzip file from PHP" );
header( 'Content-Encoding: ' . $wp_cache_gzip_encoding );
header( 'Content-Length: ' . $size );
} elseif ( $wp_supercache_304 ) {
header( "WP-Super-Cache: Served supercache 304 file from PHP" );
header( 'Content-Length: ' . $size );
} else {
header( "WP-Super-Cache: Served supercache file from PHP" );
}

// don't try to match modified dates if using dynamic code.
Expand Down