Ticket #23021: 23021.nospace.diff

File 23021.nospace.diff, 1.1 KB (added by nacin, 5 months ago)
Line 
1Index: wp-includes/functions.php
2===================================================================
3--- wp-includes/functions.php   (revision 23244)
4+++ wp-includes/functions.php   (working copy)
5@@ -925,7 +925,7 @@
6 function nocache_headers() {
7        $headers = wp_get_nocache_headers();
8        foreach( $headers as $name => $field_value )
9-               @header("{$name}: {$field_value}");
10+               @header( "$name:" . ( strlen( $field_value ) ? " $field_value" : '' ) );
11        if ( empty( $headers['Last-Modified'] ) && function_exists( 'header_remove' ) )
12                @header_remove( 'Last-Modified' );
13 }
14Index: wp-includes/class-wp.php
15===================================================================
16--- wp-includes/class-wp.php    (revision 23244)
17+++ wp-includes/class-wp.php    (working copy)
18@@ -379,7 +379,7 @@
19                if ( ! empty( $status ) )
20                        status_header( $status );
21                foreach( (array) $headers as $name => $field_value )
22-                       @header("{$name}: {$field_value}");
23+                       @header( "$name:" . ( strlen( $field_value ) ? " $field_value" : '' ) );
24 
25                if ( isset( $headers['Last-Modified'] ) && empty( $headers['Last-Modified'] ) && function_exists( 'header_remove' ) )
26                        @header_remove( 'Last-Modified' );