Gracefully handle bad URIs in Location headers