Support » Plugin: Merge + Minify + Refresh » MMR HTTP2 server push only adding header for one file

  • Resolved fhoech

    (@fhoech)


    It seems Merge+Minify+Refresh only adds a HTTP2 push header for one file. The reason for this is that it overwrites the existing ‘Link’ header instead of adding to it. Also, it seems HTTP2 push is always enabled regardless of the plugin setting.

    Fix:

    --- merge-minify-refresh.php	Mon Feb 27 01:07:28 2017
    +++ merge-minify-refresh.php	Mon Feb 27 14:04:24 2017
    @@ -310,7 +310,7 @@
     	}
     
     	public function http2push_reseource( $url, $type = '' ) {
    -		if( headers_sent() ) {
    +		if( ! $this->http2push || headers_sent() ) {
     			return FALSE;
     		}
     
    @@ -325,7 +325,7 @@
     			$http_link_header[] = 'nopush';
     		}
     
    -		header( implode('; ', $http_link_header) );
    +		header( implode('; ', $http_link_header), false );
     	}
     
     	private function host_match( $url ) {
    
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘MMR HTTP2 server push only adding header for one file’ is closed to new replies.