Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing S3 PutBucketLifecycleConfiguration and GetBucketLifecycleConfiguration #263

Open
pplu opened this issue Jun 27, 2018 · 2 comments
Open
Labels

Comments

@pplu
Copy link
Owner

pplu commented Jun 27, 2018

From a mail exchange (reproduced with permission:

i still have to modify Paws::Net::RestXmlCaller to add this to get PutBucketLifecycleConfiguration & GetBucketLifecycleConfiguration working. they complain about MD5 without it. (yes, this patch was inspired by a previous github bug i saw).

  …
if (my $xml_body = $self->_to_xml_body($call)){
     $request->content($xml_body);
   }

######## DCH MD5 patch start

   if($call->{LifecycleConfiguration})
   {
     warn "dont forget you are using a patched version of Paws::Net::RestXmlCaller\n";
     use MIME::Base64 qw(encode_base64);
     use Digest::MD5 'md5';
     my $content_md5 = encode_base64( md5( $request->content ) );
     chomp $content_md5;
     $request->headers->header( "Content-MD5" => $content_md5 );
   }

######### DCH MD5 patch end

   if ($call->can('_stream_param')) {
…

I think that the fix would be adding in the Paws botocore fork the ContentMD5 parameter

has ContentMD5 => (is => 'ro', isa => 'Str', header_name => 'Content-MD5', auto => 'MD5', traits => ['AutoInHeader']);

@pplu pplu added the bug label Jun 27, 2018
@castaway
Copy link
Collaborator

castaway commented Jul 2, 2018

We have this included as part of #244

@byterock
Copy link
Collaborator

byterock commented Feb 4, 2020

Should also be fixed in this branch

https://github.com/byterock/aws-sdk-perl/tree/s3ObjectTagging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants