You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RFC 7959: stop Block1 upload after error and validate continuation state #22
At baseline 1abe69a, BlockwiseLayer.ReceiveResponse accesses RequestBlockStatus for any response carrying Block1 and does not consistently require 2.31 Continue before sending the next request block. This can cause a null reference for an unsolicited Block1 response and can continue uploading after a 4.xx/5.xx error.
References:
RFC 7959 §2.5 (Block1 request payload transfer)
RFC 7959 §2.9.1 (2.31 Continue and block acknowledgement)
Acceptance criteria
A Block1 response without an active upload state is ignored or reported as a protocol error without crashing or starting an unrelated upload.
4.xx/5.xx responses and final success are delivered to the caller and never trigger another request block.
Only a matching 2.31 Continue advances the upload.
Duplicate, out-of-order, future, invalid-SZX, and wrong-offset acknowledgements cannot skip or replay data.
Valid SZX downshift, final block, single-block/empty payload, Block2, Observe, timeout, and cancellation paths retain their existing contracts.
Add baseline-failing tests and fixed regressions; Q-Block/BERT is outside this issue.
Acceptance clarification after reviewing RFC 7959 §2.3: a server may enact a non-final request block separately and return a successful 2.xx response with Block1.M=0; the client is still expected to send subsequent blocks. Therefore the initial 'only 2.31 Continue advances' wording is too restrictive. The fix will preserve that legal per-block mode, require 2.31 for the atomic collection mode where Block1.M=1, stop upload on 4.xx/5.xx, and validate acknowledged NUM/SZX/offset before advancing. Regression tests must include both legal continuation modes. This comment corrects the acceptance condition without rewriting the original report.
Activity
maikebing commentedon Nov 12, 2026
Acceptance clarification after reviewing RFC 7959 §2.3: a server may enact a non-final request block separately and return a successful 2.xx response with Block1.M=0; the client is still expected to send subsequent blocks. Therefore the initial 'only 2.31 Continue advances' wording is too restrictive. The fix will preserve that legal per-block mode, require 2.31 for the atomic collection mode where Block1.M=1, stop upload on 4.xx/5.xx, and validate acknowledged NUM/SZX/offset before advancing. Regression tests must include both legal continuation modes. This comment corrects the acceptance condition without rewriting the original report.