Gracefully handle a jira POST request with no content

(imported from commit d11eb4462216c5344f1231bf92159bad84a8a583)
This commit is contained in:
Leo Franchi 2013-05-15 17:54:49 -04:00 committed by Tim Abbott
parent 8c2bbf7d45
commit 9ffbc6d4ab
1 changed files with 3 additions and 0 deletions

View File

@ -1578,6 +1578,9 @@ def api_jira_webhook(request):
except (AttributeError, KeyError):
return json_error("Missing api_key parameter.")
if request.body == '':
return json_error("No XML POST data!")
payload = simplejson.loads(request.body)
try: