curl didn't understand the redirects