Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Replace unserscore to dashes for CONTENT_* headers
Browse files Browse the repository at this point in the history
For example we can have CONTENT_SECURITY_POLICY header
  • Loading branch information
michalbundyra authored and weierophinney committed Oct 8, 2019
1 parent a0aa733 commit df5d0f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions/marshal_headers_from_sapi.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function marshalHeadersFromSapi(array $server) : array
}

if (strpos($key, 'CONTENT_') === 0) {
$name = 'content-' . strtolower(substr($key, 8));
$name = str_replace('_', '-', strtolower($key));
$headers[$name] = $value;
continue;
}
Expand Down

0 comments on commit df5d0f5

Please sign in to comment.