encode unicode redirect URLs automatically

Take care of encoding location response headers automatically.