« Net/Amazon/S3/Request/Role/HTTP/Header/Content_length.pm
↑ Summary
Net/Amazon/S3/Request/Role/HTTP/Header/Content_type.pm »
| 1 | package Net::Amazon::S3::Request::Role::HTTP::Header::Content_md5; | ||
| 2 | # ABSTRACT: Content-MD5 header role | ||
| 3 | 99 | $Net::Amazon::S3::Request::Role::HTTP::Header::Content_md5::VERSION = '0.991'; | |
| 4 | 99 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 99 | ▶ | use Digest::MD5 qw[]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 99 | ▶ | use MIME::Base64 qw[]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | around _request_headers => sub { | ||
| 9 | 16 | ▶ | my ($inner, $self) = @_; |
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||
| 10 | 16 | my $content = $self->_http_request_content; | |
| 11 | |||
| 12 | 16 | my $value = MIME::Base64::encode_base64( Digest::MD5::md5( $content ) ); | |
| 13 | 16 | chomp $value; | |
| 14 | |||
| 15 | 16 | return ($self->$inner, ('Content-MD5' => $value)); | |
| 16 | 99 | }; | |
| 17 | |||
| 18 | 99 | 1; | |
| 19 | |||
| 20 | __END__ | ||
| 21 | |||
| 22 | =pod | ||
| 23 | |||
| 24 | =encoding UTF-8 | ||
| 25 | |||
| 26 | =head1 NAME | ||
| 27 | |||
| 28 | Net::Amazon::S3::Request::Role::HTTP::Header::Content_md5 - Content-MD5 header role | ||
| 29 | |||
| 30 | =head1 VERSION | ||
| 31 | |||
| 32 | version 0.991 | ||
| 33 | |||
| 34 | =head1 AUTHOR | ||
| 35 | |||
| 36 | Branislav Zahradník <barney@cpan.org> | ||
| 37 | |||
| 38 | =head1 COPYRIGHT AND LICENSE | ||
| 39 | |||
| 40 | This software is copyright (c) 2022 by Amazon Digital Services, Leon Brocard, Brad Fitzpatrick, Pedro Figueiredo, Rusty Conover, Branislav Zahradník. | ||
| 41 | |||
| 42 | This is free software; you can redistribute it and/or modify it under | ||
| 43 | the same terms as the Perl 5 programming language system itself. | ||
| 44 | |||
| 45 | =cut | ||