fix curl redirection
error unknown is known as error last update
fix some bugs
Merge remote-tracking branch 'upstream/master'

merge upstream/master