fix unicode decode error on py2 when handling redirect without scheme
3 files changed