| @@ 130-134 (lines=5) @@ | ||
| 127 | { |
|
| 128 | // Encode |
|
| 129 | $url = $this->urlEncode($url); |
|
| 130 | if (mb_stripos($url, '/') === 0) { |
|
| 131 | // Strip fragments |
|
| 132 | $url = mb_split('#', $url)[0]; |
|
| 133 | return $url; |
|
| 134 | } |
|
| 135 | if (!$this->urlValidate($url)) { |
|
| 136 | throw new Exceptions\ClientException('Invalid URL'); |
|
| 137 | } |
|
| @@ 123-125 (lines=3) @@ | ||
| 120 | foreach ($headers as $header) { |
|
| 121 | $split = array_map('trim', mb_split($delimiter, $header)); |
|
| 122 | foreach ($split as $string) { |
|
| 123 | if (mb_stripos($string, $part . '=') === 0) { |
|
| 124 | return mb_split('=', $string, 2)[1]; |
|
| 125 | } |
|
| 126 | } |
|
| 127 | } |
|
| 128 | return false; |
|