Merge pull request #454 from jrperritt/upload-file-bug-fix

check for etag header only if resp is not nil