Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Commit

Permalink
bug #190 Capitalize first char of second word in headers (ossinkine)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 2.0-dev branch (closes #190).

Discussion
----------

Capitalize first char of second word in headers

Commits
-------

8bc9873 Capitalize first char of second word in headers
  • Loading branch information
fabpot committed Nov 17, 2014
2 parents f936186 + 8bc9873 commit 513c8f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Goutte/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ protected function doRequest($request)
{
$headers = array();
foreach ($request->getServer() as $key => $val) {
$key = implode('-', array_map('ucfirst', explode('-', strtolower(str_replace('_', '-', $key)))));
$contentHeaders = array('Content-length' => true, 'Content-md5' => true, 'Content-type' => true);
if (0 === strpos($key, 'Http-')) {
$key = strtolower(str_replace('_', '-', $key));
$contentHeaders = array('content-length' => true, 'content-md5' => true, 'content-type' => true);
if (0 === strpos($key, 'http-')) {
$headers[substr($key, 5)] = $val;
}
// CONTENT_* are not prefixed with HTTP_
Expand Down

0 comments on commit 513c8f8

Please sign in to comment.