Ticket #23021: 23021.2.diff
| File 23021.2.diff, 1.6 KB (added by SergeyBiryukov, 5 months ago) |
|---|
-
wp-includes/class-wp.php
376 376 377 377 $headers = apply_filters('wp_headers', $headers, $this); 378 378 379 if ( isset( $headers['Last-Modified'] ) && empty( $headers['Last-Modified'] ) ) 380 unset( $headers['Last-Modified'] ); 381 379 382 if ( ! empty( $status ) ) 380 383 status_header( $status ); 381 384 foreach( (array) $headers as $name => $field_value ) 382 385 @header("{$name}: {$field_value}"); 383 386 384 if ( isset( $headers['Last-Modified'] ) && empty( $headers['Last-Modified'] ) && function_exists( 'header_remove' ) )385 @header_remove( 'Last-Modified' );386 387 387 if ( $exit_required ) 388 388 exit(); 389 389 -
wp-includes/functions.php
902 902 function wp_get_nocache_headers() { 903 903 $headers = array( 904 904 'Expires' => 'Wed, 11 Jan 1984 05:00:00 GMT', 905 'Last-Modified' => '',906 905 'Cache-Control' => 'no-cache, must-revalidate, max-age=0', 907 906 'Pragma' => 'no-cache', 908 907 ); … … 924 923 */ 925 924 function nocache_headers() { 926 925 $headers = wp_get_nocache_headers(); 926 if ( isset( $headers['Last-Modified'] ) && empty( $headers['Last-Modified'] ) ) 927 unset( $headers['Last-Modified'] ); 927 928 foreach( $headers as $name => $field_value ) 928 929 @header("{$name}: {$field_value}"); 929 if ( empty( $headers['Last-Modified'] ) && function_exists( 'header_remove' ) )930 @header_remove( 'Last-Modified' );931 930 } 932 931 933 932 /**
