prevent crash when 302 is returned without location header