My account is enabled and on a portal, there is a link that tests the subtenant by running a POST object and DELETE object calls. This test was successful, and I used the timestamp from that request, keyed it into my code and compared the signatures, they match, and that is why I think my signatures are correct.
However when I run my perl program, I get the error mentioned.
Just for confirmation, following is the format of date I put in after reordering the output of gmtime();
Tue, 4 Jul 2012 04:27:53 GMT
In canonicalized EMCHeaders, i use x-emc-uid alone.
I believe the problem is that Perl's "encode_base64" function appends a newline to its output value. You need to suppress this behavior by adding an empty string as the second argument.
The 2-minute delay you were seeing was because you specified Content-Length:200 but didn't send any data. The server was waiting until it timed out. You should either set Content-Length:0 or use --data-binary=@filename to send a file.
Here's my updated code. I also removed the extra $Date from the signature and just kept the newline.
Have you considered using one of our language bindings if you're using Java, .NET, PHP, Ruby, etc? The bindings perform request signing, sending, parsing, etc.
Can you post a Wireshark trace of the HTTP request so that we can look at what's actually being sent over the wire?
JasonCwik
1 Rookie
•
281 Posts
3646
0
Posted July 13th, 2012 11:00
I believe the problem is that Perl's "encode_base64" function appends a newline to its output value. You need to suppress this behavior by adding an empty string as the second argument.
The 2-minute delay you were seeing was because you specified Content-Length:200 but didn't send any data. The server was waiting until it timed out. You should either set Content-Length:0 or use --data-binary=@filename to send a file.
Here's my updated code. I also removed the extra $Date from the signature and just kept the newline.
And the output: