boto/boto — pull request #1943 by kdmukai (2013-12-22 19:06:24+00:00)
Title: Remove unnecessary '?' from req.path on POST

The if/else logic in add_auth on line 491 only handles if qs and POST.

But if you're POSTing with no query string, execution falls into the else condition on line 497 and an unnecessary '?' is added with a blank query string.

My elastictranscoder.create_job calls were failing due to the unnecessary '?' in the path. It would return:

JSONResponseError: 403 Forbidden
{u'message': u"When Content-Type:application/x-www-form-urlencoded, URL cannot include query-string parameters (after '?'): '/2012-09-25/jobs?'"}

I'm not sure why, but the bug only happens when running on Google App Engine. My local dev_appserver was able to make the create_job request just fine.