support proper 301 from server