private function modifyRequest(RequestInterface $request, CommandInterface $command)
 {
     $uri = $request->getUri();
     $path = $uri->getPath();
     $bucket = $command['Bucket'];
     $path = $this->removeBucketFromPath($path, $bucket);
     // Modify the Key to make sure the key is encoded, but slashes are not.
     if ($command['Key']) {
         $path = S3Client::encodeKey(rawurldecode($path));
     }
     return $request->withUri($uri->withPath($path));
 }
 private function canAccelerate(CommandInterface $command)
 {
     return empty(self::$exclusions[$command->getName()]) && S3Client::isBucketDnsCompatible($command['Bucket']);
 }