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

Commit

Permalink
Small simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Mar 12, 2016
1 parent dcad567 commit e54499b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ServerRequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ public static function marshalHeaders(array $server)
$headers = [];
foreach ($server as $key => $value) {
if ($value && strpos($key, 'HTTP_') === 0) {
$name = strtr(substr($key, 5), '_', ' ');
$name = strtr(ucwords(strtolower($name)), ' ', '-');
$name = substr($key, 5);
$name = strtr($name, '_', '-');
$name = strtolower($name);

$headers[$name] = $value;
Expand Down

0 comments on commit e54499b

Please sign in to comment.