Skip to content

Commit 200e517

Browse files
committed
Set only Last-Modified with header(), which merges into existing headers
1 parent 12e0ff5 commit 200e517

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -585,10 +585,9 @@ protected function add_last_modified_header( $response, $post ) {
585585
return;
586586
}
587587

588-
$response->set_headers(
589-
array(
590-
'Last-Modified' => gmdate( 'D, d M Y H:i:s', $modified->getTimestamp() ) . ' GMT',
591-
)
588+
$response->header(
589+
'Last-Modified',
590+
gmdate( 'D, d M Y H:i:s', $modified->getTimestamp() ) . ' GMT'
592591
);
593592
}
594593

0 commit comments

Comments
 (0)