src/Transport/Curl.php 1 location
|
@@ 101-107 (lines=7) @@
|
| 98 |
|
|
| 99 |
|
$rawHeaders = explode("\n", $rawHeaders); |
| 100 |
|
$headers = array(); |
| 101 |
|
foreach ($rawHeaders as $row) { |
| 102 |
|
$row = trim($row); |
| 103 |
|
$index = strpos($row, ':'); |
| 104 |
|
if ($index > 0) { |
| 105 |
|
$headers[substr($row, 0, $index)] = trim(substr($row, $index + 1)); |
| 106 |
|
} |
| 107 |
|
} |
| 108 |
|
|
| 109 |
|
// Building response |
| 110 |
|
return new Response($status, $headers, $body); |
src/Transport/PersistentCurl.php 1 location
|
@@ 109-115 (lines=7) @@
|
| 106 |
|
|
| 107 |
|
$rawHeaders = explode("\n", $rawHeaders); |
| 108 |
|
$headers = array(); |
| 109 |
|
foreach ($rawHeaders as $row) { |
| 110 |
|
$row = trim($row); |
| 111 |
|
$index = strpos($row, ':'); |
| 112 |
|
if ($index > 0) { |
| 113 |
|
$headers[substr($row, 0, $index)] = trim(substr($row, $index + 1)); |
| 114 |
|
} |
| 115 |
|
} |
| 116 |
|
|
| 117 |
|
// Building response |
| 118 |
|
return new Response($status, $headers, $body); |