interchange / Amazon-MWS

API binding for Amazon's Marketplace Web Services.
8 stars 8 forks source link

Signature needs to be escaped for POST methods #15

Open jordanmhiller opened 6 years ago

jordanmhiller commented 6 years ago

Amazon::MWS::Routines::sign_request sometimes pads the signature with "=", but it neglects to escape the signature when included in the request body.

For example, when trying to use CreateInboundShipmentPlan I received the following error from Amazon:

`<?xml version="1.0"?>

Sender InvalidParameterValue Invalid query string provided - AWSAccessKeyId=...&Signature=...A= is not valid; the value of a query string parameter may not contain a '=' delimiter ... ` The attached patch seems to solve the issue for me. [Routines.pm.patch.txt](https://github.com/interchange/Amazon-MWS/files/1787276/Routines.pm.patch.txt)
racke commented 6 years ago

Thanks a lot, @jordanmhiller. I applied the patch through 412484c. If you want your real name in ACKNOWLEDGEMENTS, please let me know.