urllib.quote/unquote must be str on Python 2
escape URLs in Location headers