rlauer6 / perl-amazon-s3

A portable client library for working with and managing Amazon S3 buckets and keys.
http://search.cpan.org/dist/Amazon-S3/
2 stars 6 forks source link

0.55 issues #8

Closed cfzumbrun closed 1 year ago

cfzumbrun commented 2 years ago

Amazon::S3 version 0.55, Perl v5.34.0, Ubuntu 22.04

Issues with Amazon::S3::Bucket

  1. Typo at line 878, return $self->account->last_reponse; should be return $self->account->last_response;

  2. add_key_filename is returning undef after a successful add. Below is a dump of last_response() after a successful save and add_key_filename returning undef:

    $VAR1 = bless( {
    '_content' => '',
    '_headers' => bless( {
    '::std_case' => {
      'client-date' => 'Client-Date',
      'client-peer' => 'Client-Peer',
      'client-response-num' => 'Client-Response-Num',
      'client-ssl-cert-issuer' => 'Client-SSL-Cert-Issuer',
      'client-ssl-cert-subject' => 'Client-SSL-Cert-Subject',
      'client-ssl-cipher' => 'Client-SSL-Cipher',
      'client-ssl-socket-class' => 'Client-SSL-Socket-Class',
      'client-ssl-version' => 'Client-SSL-Version',
      'x-amz-id-2' => 'X-Amz-Id-2',
      'x-amz-request-id' => 'X-Amz-Request-Id',
      'x-amz-server-side-encryption' => 'X-Amz-Server-Side-Encryption'
    },
    'client-date' => 'Fri, 30 Sep 2022 11:50:56 GMT',
    'client-peer' => '3.5.6.144:443',
    'client-response-num' => 1,
    'client-ssl-cert-issuer' => '/C=US/O=Amazon/OU=Server CA 1B/CN=Amazon',
    'client-ssl-cert-subject' => '/CN=s3.amazonaws.com',
    'client-ssl-cipher' => 'ECDHE-RSA-AES128-GCM-SHA256',
    'client-ssl-socket-class' => 'IO::Socket::SSL',
    'client-ssl-version' => 'TLSv1_2',
    'connection' => 'close',
    'content-length' => '0',
    'date' => 'Fri, 30 Sep 2022 11:50:57 GMT',
    'etag' => '"d7b047cec852690cba998ebcf1310198"',
    'server' => 'AmazonS3',
    'x-amz-id-2' => '2T6M3qECd86lBYDfYJ2ad77fahzHW0LqKAVSuwaR1j2hCKqY+12MjF1qBKs2CDU+pkKR2beuOh7MPBB+aFoUhg==',
    'x-amz-request-id' => 'FKNKAJBNSY3MKMGC',
    'x-amz-server-side-encryption' => 'AES256'
    }, 'HTTP::Headers' ),
    '_msg' => 'OK',
    '_protocol' => 'HTTP/1.1',
    '_rc' => '200',
    '_request' => bless( {
    '_content' => sub { "DUMMY" },
    '_headers' => bless( {
      '::std_case' => {
        'if-ssl-cert-subject' => 'If-SSL-Cert-Subject',
        'x-amz-content-sha256' => 'X-Amz-Content-Sha256',
        'x-amz-date' => 'X-Amz-Date',
        'x-amz-server-side-encryption' => 'X-Amz-Server-Side-Encryption'
      },
      'authorization' => 'AWS4-HMAC-SHA256 Credential=***/20220930/us-east-1/s3/aws4_request,SignedHeaders=content-length;content-md5;date;host;x-amz-content-sha256;x-amz-date;x-amz-server-side-encryption,Signature=c07e69d689477e8e4582ffc0937b95e4faebcac93ccaa93b70de49130a966f40',
      'content-length' => 8568,
      'content-md5' => '17BHzshSaQy6mY688TEBmA==',
      'date' => 'Fri, 30 Sep 2022 11:50:56 GMT',
      'host' => 'cws-documents.s3.us-east-1.amazonaws.com',
      'user-agent' => 'libwww-perl/6.61',
      'x-amz-content-sha256' => 'UNSIGNED-PAYLOAD',
      'x-amz-date' => '20220930T115056Z',
      'x-amz-server-side-encryption' => 'AES256'
    }, 'HTTP::Headers' ),
    '_method' => 'PUT',
    '_protocol' => undef,
    '_uri' => bless( do{\(my $o = 'https://cws-documents.s3.us-east-1.amazonaws.com/user_images/2/3ba56841-280f-40d0-ab41-043e2a263153.jpg')}, 'URI::https' ),
    '_uri_canonical' => $VAR1->{'_request'}{'_uri'}
    }, 'HTTP::Request' )
    }, 'HTTP::Response' );