Skip to content

Commit d257b9b

Browse files
committed
Fix HEAD not being retried for HTTP 500 category responses. See #579
1 parent d00cf4b commit d257b9b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/upload.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,11 @@ class BaseUpload {
615615
if (status === 423) {
616616
this._emitHttpError(req, res, 'tus: upload is currently locked; retry later')
617617
return
618+
} else if (inStatusCategory(status, 500)) {
619+
// Run retry logic if the server has an error, e.g. 502 Bad Gateway when
620+
// proxied server is temporarily down. See issue #579.
621+
this._emitHttpError(req, res, 'tus: resuming upload resulted in HTTP 500 category error')
622+
return
618623
}
619624

620625
if (inStatusCategory(status, 400)) {

0 commit comments

Comments
 (0)