After upgraded to the latest SDK 1.9.17, I start to get this error when I run my project with dev_appengine.py
locally
INFO 2014-12-10 09:48:33,364 myapp.py:796] Url: http://saas.examples.com/documents, payload: {'filename': u'testlink.doc', 'key': u'p1UuXhzhS4qjj2KXmFre'}
WARNING 2014-12-10 09:48:34,089 urlfetch_stub.py:451] Received a 301 to a POST. Redirecting with a GET
WARNING 2014-12-10 09:48:34,791 myapp.py:809] failed. Code: 405, error: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>
My code is very simple.
result = urlfetch.fetch(
url=url,
payload=json.dumps(payload),
method=urlfetch.POST,
headers={'Content-Type': 'application/json'})
if result.status_code == utils.OK:
json_result = json.loads(result.content)
else:
logging.warn(
'failed. Code: %s, error: %s',
result.status_code, result.content)
After reverting to previous version of SDK (1.9.15) the exception disappear again.
My Questions:
1) Is it a GAE bug? If so what is the proper way to report to GAE team?
2) If it is not a GAE SDK problem, how can I fix my code?