Repository navigation
fix(core): define 404/410 for resources removed after the challenge - #409
Open
MizukiSonoko wants to merge 2 commits into
Open
MizukiSonoko wants to merge 2 commits into
MizukiSonoko wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Section 4.2 (Status Codes) only enumerates 402, 200 and 403 as outcomes once a Payment credential has been presented, so the behavior for a resource removed between challenge issuance and credential presentation is undefined. For methods where verification is settlement (such as lightning), a conforming server could settle a payment for a resource it can never deliver.
This PR adds the 404/410 outcome to the core and requires servers to check resource availability before consuming the challenge or settling, as proposed in #393.
Closes #393
Changes
idor settling; on 404/410 they MUST NOT include aWWW-Authenticate: Paymentchallenge, settle, mark the challenge consumed, or returnPayment-Receipt. Clients MUST NOT retry with the same credential. Refund semantics for prepaid methods are left to method specs.Cache-Control: no-storeand anabout:blankProblem Details body. No new problem type is introduced.The revision is not bumped. Earlier content changes to the core (#362, #328, #323) did not bump either; only the datatracker expiry renewal (#351) did, since a bump triggers
submit-draft.yml. Happy to bump to -02 if you prefer.Test plan
make lintmake test(80 passed)make check(all drafts build, rfclint passes)