Fixes: https://pagure.io/koji/issue/3268
When we return an http 400 code instead of a fault, the client will retry the call if it has retries enabled. The only fault that is retried is ServerOffline and that does not seem appropriate here.
ServerOffline
1 new commit added
fix indent
also raise 400 errors when we can't read the client upload stream
Upon further testing, I realized the initial version of this PR did not address upload calls. The new commit extends the change to cover that as well.
This works well for me locally. If I simulate the OSErrors, the client upload code will retry.
Retrying an upload call that may have partially written the chunk might seem iffy, but each successive retry call is writing the same content to the same offset and the fastUpload code will perform an extra verify at the end if there are any retries (and it has always done so).
Metadata Update from @jobrauer: - Pull-request tagged with: testing-ready
Metadata Update from @jobrauer: - Pull-request tagged with: testing-done
Commit f5fe7a55 fixes this pull-request
Pull-Request has been merged by tkopecek
Fixes: https://pagure.io/koji/issue/3268