SignatureDoesNotMatch error on certain save calls - SOLVED

31 views
Skip to first unread message

chrisfinne

unread,
Apr 12, 2010, 1:10:26 PM4/12/10
to SimpleRecord
When putting attributes that have UTF-8 chars in them, it will
sometimes fail with a Aws::AwsError: SignatureDoesNotMatch error

the "sometimes" is when the length of the URL being sent to AWS is >
2000, the AWS gem conveniently switches to an HTTP POST.

in right_awsbase.rb line # 398

request['Content-Type'] = 'application/x-www-form-urlencoded'
should be:
request['Content-Type'] = 'application/x-www-form-urlencoded;
charset=utf-8'

this was PAINFUL to debug and I'm guessing Amazon's fault for not
documenting this?

Travis Reeder

unread,
Apr 12, 2010, 4:15:49 PM4/12/10
to simple...@googlegroups.com
Wow, you may have solved an age old bug if this really works. I've put your fix into the code, any chance you write a test case for this?

Travis


--
You received this message because you are subscribed to the Google Groups "SimpleRecord" group.
To post to this group, send email to simple...@googlegroups.com.
To unsubscribe from this group, send email to simple-recor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simple-record?hl=en.


Chris Finne

unread,
Apr 12, 2010, 6:40:24 PM4/12/10
to simple...@googlegroups.com
I'm not sure how to run tests for a gem, so i wrote some tests that prove out the patch in my application. Here's the gist of those tests rewritten in a format similar to the gem's unit tests...

Reply all
Reply to author
Forward
0 new messages