Skip to content

Conversation

vincedevendra
Copy link

I noticed while testing out retry behavior on a deferred length upload that if the final chunk request received a retryable error response from the server, the retry would fail due to a missing Upload-Length header and the upload would not be recoverable. I was able to stably reproduce the issue by pointing to a local tusd server set to 409 whenever the Upload-Length header was present.

As far as I can tell, nothing hangs on this._uploadLengthDeferred being set to false on the final chunk request, and it's necessary for it to be present on a retry so the retry gains the Upload-Length header, so the simplest solution is just to remove this line.

Before this change, if the last chunk upload resulted in a retryable error, the
retry will not have the `Upload-Length` header set and the retry will
fail. Since there is no need to remove
`upload._uploadLengthDeferred` and doing so results in the header not
being set on the retry, this PR leaves it set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant