Better redirection handling, auto adress discovery
Merge pull request #844 from emmanuel-keller/1.6

Better redirection handling, auto adress discovery