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

Commit df5d0f5

Browse files
michalbundyraweierophinney
authored andcommitted
Replace unserscore to dashes for CONTENT_* headers
For example we can have CONTENT_SECURITY_POLICY header
1 parent a0aa733 commit df5d0f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/functions/marshal_headers_from_sapi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function marshalHeadersFromSapi(array $server) : array
5151
}
5252

5353
if (strpos($key, 'CONTENT_') === 0) {
54-
$name = 'content-' . strtolower(substr($key, 8));
54+
$name = str_replace('_', '-', strtolower($key));
5555
$headers[$name] = $value;
5656
continue;
5757
}

0 commit comments

Comments
 (0)