WordPress.org

Make WordPress Core

Ticket #23021: 23021.nospace.diff

File 23021.nospace.diff, 1.1 KB (added by nacin, 7 years ago)
  • wp-includes/functions.php

     
    925925function nocache_headers() {
    926926        $headers = wp_get_nocache_headers();
    927927        foreach( $headers as $name => $field_value )
    928                 @header("{$name}: {$field_value}");
     928                @header( "$name:" . ( strlen( $field_value ) ? " $field_value" : '' ) );
    929929        if ( empty( $headers['Last-Modified'] ) && function_exists( 'header_remove' ) )
    930930                @header_remove( 'Last-Modified' );
    931931}
  • wp-includes/class-wp.php

     
    379379                if ( ! empty( $status ) )
    380380                        status_header( $status );
    381381                foreach( (array) $headers as $name => $field_value )
    382                         @header("{$name}: {$field_value}");
     382                        @header( "$name:" . ( strlen( $field_value ) ? " $field_value" : '' ) );
    383383
    384384                if ( isset( $headers['Last-Modified'] ) && empty( $headers['Last-Modified'] ) && function_exists( 'header_remove' ) )
    385385                        @header_remove( 'Last-Modified' );