Skip Menu |

This queue is for tickets about the Net-Amazon-EC2 CPAN distribution.

Report information
The Basics
Id: 43235
Status: resolved
Priority: 0/
Queue: Net-Amazon-EC2

People
Owner: Nobody in particular
Requestors: aar [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.09
Fixed in: 0.11



Subject: Usage of GET instead of POST limits UserData to 8kb
The parameter UserData in run_instances may contain up to 16kb according to the EC2 spec. However, if we send the request through GET, we run into a 8kb limit for the query string. Thus getting a fatal server error on run_instances. I easily fixed this by switching to HTTP POST. See around line 156 of EC2.pm: 1) remove the line: $uri->query_form(\%params); - replace the line: my $res = $ua->get($ur); with: my $res = $ua->post($ur, \%params); That's all.
On Gio. 12 Feb. 2009 09:37:01, AAR wrote: Show quoted text
> The parameter UserData in run_instances may contain up to 16kb > according to the EC2 spec. > However, if we send the request through GET, we run into a 8kb limit > for the query string. > Thus getting a fatal server error on run_instances. > > I easily fixed this by switching to HTTP POST. > > See around line 156 of EC2.pm: > > 1) remove the line: > $uri->query_form(\%params); > > - replace the line: > my $res = $ua->get($ur); > with: > my $res = $ua->post($ur, \%params); > > That's all.
Thank you, however the fix is incomplete and broke things. Form params need to passed to the $ua->post() method and no more inserted in the URI (note that forms submitted via POST instead of GET do not pass their values in the query string). I fear that the module is currently broken. See my post above in this ticket for a complete bugfix.