Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Do not cache timestamp. This avoids long-running processes causing aws ... #5

Merged
merged 1 commit into from

2 participants

@clkao

...to return 'Request has expired' errors

@mrallen1 mrallen1 merged commit 292ac3f into from
@mrallen1
Owner

Thanks for the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 20, 2012
  1. @clkao

    Do not cache timestamp. This avoids long-running processes causing aw…

    clkao authored
    …s to return 'Request has expired' errors
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 14 deletions.
  1. +8 −14 lib/Net/Amazon/EC2.pm
View
22 lib/Net/Amazon/EC2.pm
@@ -155,20 +155,6 @@ has 'signature_version' => ( is => 'ro', isa => 'Int', required => 1, default =>
has 'version' => ( is => 'ro', isa => 'Str', required => 1, default => '2011-01-01' );
has 'region' => ( is => 'ro', isa => 'Str', required => 1, default => 'us-east-1' );
has 'ssl' => ( is => 'ro', isa => 'Bool', required => 1, default => 0 );
-has 'timestamp' => (
- is => 'ro',
- isa => 'Str',
- required => 1,
- lazy => 1,
- clearer => '_clear_timestamp',
- default => sub {
- my $ts = time2isoz();
- chop($ts);
- $ts .= '.000Z';
- $ts =~ s/\s+/T/g;
- return $ts;
- }
-);
has 'base_url' => (
is => 'ro',
isa => 'Str',
@@ -179,6 +165,14 @@ has 'base_url' => (
}
);
+sub timestamp {
+ my $ts = time2isoz();
+ chop($ts);
+ $ts .= '.000Z';
+ $ts =~ s/\s+/T/g;
+ return $ts;
+};
+
sub _sign {
my $self = shift;
my %args = @_;
Something went wrong with that request. Please try again.