Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Don't have requests re-serialize the http event data.
Browse files Browse the repository at this point in the history
We make use of the BSON serializer, so we can't let requests do the
serializing for us. Therefore we need to use the `data` kwarg rather
than the `json` kwarg and just set the content type ourselves.

closes #1776
  • Loading branch information
jeremycline committed Mar 15, 2016
1 parent 87529be commit a6f8f83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/pulp/server/event/http.py
Expand Up @@ -55,7 +55,7 @@ def _send_post(notifier_config, json_body):
else:
auth = None

response = post(url, json=json_body, auth=auth)
response = post(url, data=json_body, auth=auth, headers={'Content-Type': 'application/json'})
if response.status_code != 200:
_logger.error(_('Received HTTP {code} from HTTP notifier to {url}.').format(
code=response.status_code, url=url))

0 comments on commit a6f8f83

Please sign in to comment.