| @@ 146-150 (lines=5) @@ | ||
| 143 | { |
|
| 144 | // Encode |
|
| 145 | $url = $this->urlEncode($url); |
|
| 146 | if (mb_stripos($url, '/') === 0) { |
|
| 147 | // Strip fragments |
|
| 148 | $url = mb_split('#', $url)[0]; |
|
| 149 | return $url; |
|
| 150 | } |
|
| 151 | if (!$this->urlValidate($url)) { |
|
| 152 | throw new Exceptions\ClientException('Invalid URL'); |
|
| 153 | } |
|
| @@ 118-120 (lines=3) @@ | ||
| 115 | foreach ($headers as $header) { |
|
| 116 | $split = array_map('trim', mb_split($delimiter, $header)); |
|
| 117 | foreach ($split as $string) { |
|
| 118 | if (mb_stripos($string, $part . '=') === 0) { |
|
| 119 | return mb_split('=', $string, 2)[1]; |
|
| 120 | } |
|
| 121 | } |
|
| 122 | } |
|
| 123 | return false; |
|