From 99abe90f021493697b36c5196b14e82738f4a700 Mon Sep 17 00:00:00 2001 From: Thrijith Thankachan Date: Fri, 12 Apr 2019 00:43:33 +0530 Subject: [PATCH] Fix header key comparison --- admin/class-nginx-helper-admin.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/admin/class-nginx-helper-admin.php b/admin/class-nginx-helper-admin.php index ec519e06..2ba4ecfd 100644 --- a/admin/class-nginx-helper-admin.php +++ b/admin/class-nginx-helper-admin.php @@ -427,10 +427,11 @@ public function add_timestamps() { foreach ( headers_list() as $header ) { list( $key, $value ) = explode( ':', $header, 2 ); - if ( 'Content-Type' === $key && strpos( trim( $value ), 'text/html' ) !== 0 ) { + $key = strtolower( $key ); + if ( 'content-type' === $key && strpos( trim( $value ), 'text/html' ) !== 0 ) { return; } - if ( 'Content-Type' === $key ) { + if ( 'content-type' === $key ) { break; } }