fix a serious bug for uploading
ignore all SIGPIPE
Merge remote-tracking branch 'madeye/master'