tag 692181 + moreinfo thanks Hey,
On Fri, 02 Nov 2012 18:31:37 -0700 Erik Anderson <[email protected]> wrote: > Package: libnet-amazon-s3-perl > Version: 0.53-1 > Severity: minor > Tags: patch > > As seems to often be the case, attempts to use a library beyond its stated capabilities results in discoveries of incomplete coding. > > I do recognize there is a newer version of this library, however looking over it appears to indicate similar business rules in this area. > > Proposed feature changes to HTTPRequest.pm: > > Methods > Old rule: permits DELETE, GET, HEAD, PUT > New rule: permits DELETE, GET, HEAD, PUT, POST > > Sub-resources > Old rule: permits one of acl, torrent, location > New rule: permits one each of acl, lifecycle, location, logging, notification, partNumber, policy, requestPayment, torrent, uploadId, uploads, versionId, versioning, versions, website > > Sample code: > > sub initiateMultipartUpload > { > my $path = shift; > my $newUpload = Net::Amazon::S3::HTTPRequest->new({ > s3 => $s3, > method => 'POST', > # $s3->_urlescape escapes dots and slashes, uri_escape_utf8 escapes slashes. Why? > path => $config->path . uri_escape_utf8($path, '^A-Za-z0-9\-\._~\x2f') . '?uploads' > }); > > my $newUploadReq = $newUpload->http_request; > #die $newUploadReq->as_string; > my $xpc = $s3->_send_request($newUploadReq); > # Amazon isn't returning a Content-Type for this request, so it likely won't be parsed for us > $xpc = $s3->_xpc_of_content($xpc) if ( $xpc && !ref($xpc) ); > return undef unless $xpc && !$s3->_remember_errors($xpc); > > my $bucket = $xpc->findvalue("//s3:Bucket"); > my $key = $xpc->findvalue("//s3:Key"); > my $uploadID = $xpc->findvalue("//s3:UploadId"); > > return { > bucket => $bucket, > key => $key, > upload_id => $uploadID > }; > } > > Please note that perl is not my first language, I would be very suprised if there were not issues with style or not doing things "the perl way" Something tells me that these are already in the upstream now, could you cross check if this bug is still valid? Best, Utkarsh
signature.asc
Description: OpenPGP digital signature

