http: add helper function for checking redirect status