fixed a bug with proxy request and https redirection