a416e54765
Trying to send a non-latin-1-encodable header raises an exception, so we encode the Referer value ourselves with 'errors=ignore'.