http-client: Fix broken handling of permanent redirects
osx: Keep navigator when closing window