__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace Aws\Api\Parser;
use Aws\Api\StructureShape;
use Aws\CommandInterface;
use Aws\Exception\AwsException;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamInterface;
use GuzzleHttp\Psr7;
/**
* @internal Decorates a parser and validates the x-amz-crc32 header.
*/
class Crc32ValidatingParser extends AbstractParser
{
/**
* @param callable $parser Parser to wrap.
*/
public function __construct(callable $parser)
{
$this->parser = $parser;
}
public function __invoke(
CommandInterface $command,
ResponseInterface $response
) {
if ($expected = $response->getHeaderLine('x-amz-crc32')) {
$hash = hexdec(Psr7\Utils::hash($response->getBody(), 'crc32b'));
if ($expected != $hash) {
throw new AwsException(
"crc32 mismatch. Expected {$expected}, found {$hash}.",
$command,
[
'code' => 'ClientChecksumMismatch',
'connection_error' => true,
'response' => $response
]
);
}
}
$fn = $this->parser;
return $fn($command, $response);
}
public function parseMemberFromStream(
StreamInterface $stream,
StructureShape $member,
$response
) {
return $this->parser->parseMemberFromStream($stream, $member, $response);
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| Exception | Folder | 0777 |
|
|
| AbstractParser.php | File | 1006 B | 0777 |
|
| AbstractRestParser.php | File | 5.49 KB | 0777 |
|
| Crc32ValidatingParser.php | File | 1.48 KB | 0777 |
|
| DecodingEventStreamIterator.php | File | 8.86 KB | 0777 |
|
| EventParsingIterator.php | File | 4.89 KB | 0777 |
|
| JsonParser.php | File | 2.01 KB | 0777 |
|
| JsonRpcParser.php | File | 2.27 KB | 0777 |
|
| MetadataParserTrait.php | File | 2.57 KB | 0777 |
|
| NonSeekableStreamDecodingEventStreamIterator.php | File | 2.43 KB | 0777 |
|
| PayloadParserTrait.php | File | 1.44 KB | 0777 |
|
| QueryParser.php | File | 1.73 KB | 0777 |
|
| RestJsonParser.php | File | 1.22 KB | 0777 |
|
| RestXmlParser.php | File | 1.06 KB | 0777 |
|
| XmlParser.php | File | 5.02 KB | 0777 |
|