Skip to content

Commit

Permalink
Merge pull request #200 from rtCamp/fix/content-type-validation
Browse files Browse the repository at this point in the history
Fix header key comparison
  • Loading branch information
chandrapatel authored May 27, 2019
2 parents ec0b566 + 99abe90 commit 7a530db
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions admin/class-nginx-helper-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 7a530db

Please sign in to comment.