Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 122... Línea 122...
122
    private function getChecksumsMiddleware()
122
    private function getChecksumsMiddleware()
123
    {
123
    {
124
        return function (callable $handler) {
124
        return function (callable $handler) {
125
            return function (
125
            return function (
126
                CommandInterface $command,
126
                CommandInterface $command,
127
                RequestInterface $request = null
127
                ?RequestInterface $request = null
128
            ) use ($handler) {
128
            ) use ($handler) {
129
                // Accept "ContentSHA256" with a lowercase "c" to match other Glacier params.
129
                // Accept "ContentSHA256" with a lowercase "c" to match other Glacier params.
130
                if (!$command['ContentSHA256'] && $command['contentSHA256']) {
130
                if (!$command['ContentSHA256'] && $command['contentSHA256']) {
131
                    $command['ContentSHA256'] = $command['contentSHA256'];
131
                    $command['ContentSHA256'] = $command['contentSHA256'];
132
                    unset($command['contentSHA256']);
132
                    unset($command['contentSHA256']);
Línea 193... Línea 193...
193
    private function getApiVersionMiddleware()
193
    private function getApiVersionMiddleware()
194
    {
194
    {
195
        return function (callable $handler) {
195
        return function (callable $handler) {
196
            return function (
196
            return function (
197
                CommandInterface $command,
197
                CommandInterface $command,
198
                RequestInterface $request = null
198
                ?RequestInterface $request = null
199
            ) use ($handler) {
199
            ) use ($handler) {
200
                return $handler($command, $request->withHeader(
200
                return $handler($command, $request->withHeader(
201
                    'x-amz-glacier-version',
201
                    'x-amz-glacier-version',
202
                    $this->getApi()->getMetadata('apiVersion')
202
                    $this->getApi()->getMetadata('apiVersion')
203
                ));
203
                ));