encode hostname as unicode before adding as header

This commit is contained in:
Alan Hamlett 2016-03-06 12:34:59 -08:00
parent b6bd75a0e8
commit 12e4f56d4b
1 changed files with 1 additions and 1 deletions

View File

@ -341,7 +341,7 @@ def send_heartbeat(project=None, branch=None, hostname=None, stats={}, key=None,
'Authorization': auth,
}
if hostname:
headers['X-Machine-Name'] = hostname
headers['X-Machine-Name'] = u(hostname)
proxies = {}
if proxy:
proxies['https'] = proxy