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

Commit

Permalink
Specify Content-Type in analytics_notifier POST
Browse files Browse the repository at this point in the history
Summary: Some servers require this (like ours), and it is probably a good idea anyway.

Test Plan: Manual, sorta.

Reviewers: josiah

Reviewed By: josiah

Subscribers: changesbot, wwu

Differential Revision: https://tails.corp.dropbox.com/D95042
  • Loading branch information
kylec1 committed Mar 11, 2015
1 parent 1d139a5 commit 361cd24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion changes/listeners/analytics_notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def post_build_data(url, data):
# NB: We send an array of JSON objects rather than a single object
# so the interface doesn't need to change if we later want to do batch
# posting.
resp = requests.post(url, data=json.dumps([data]))
resp = requests.post(url, headers={'Content-Type': 'application/json'}, data=json.dumps([data]))
resp.raise_for_status()
# Should probably retry here so that transient failures don't result in
# missing data.
Expand Down

0 comments on commit 361cd24

Please sign in to comment.