summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@linaro.org>2016-09-16 12:03:35 +0100
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2016-09-16 12:03:35 +0100
commitc4b831744277064f05a7228b4e003b8adcef4a67 (patch)
tree1492b4033d7c6f7c28d97bd372c45e260f24e8f2
parent6fbcf60fcb6a42d592df131cb6620227c014f2f3 (diff)
Added Host HTTP header
On some hosts TLS SNI was preventing connection due to missing 'Host' header. This patch fixes the issue. Change-Id: I62e83b2800a1fa8efdc7e9482edd0312e8d19614 Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
-rw-r--r--post-build-report.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/post-build-report.py b/post-build-report.py
index 7a40c37..5258100 100644
--- a/post-build-report.py
+++ b/post-build-report.py
@@ -62,6 +62,7 @@ def _push_object(auth_pw, backend_url, endpoint, params, files):
conn.putheader("Authorization", "Token %s" % auth_pw)
conn.putheader('Content-Type', content_type)
conn.putheader('Content-Length', str(len(body)))
+ conn.putheader('Host', usplit.netloc)
conn.endheaders()
conn.send(body)
errcode, errmsg, headers = conn.getreply()