Repository navigation
fix: encode object keys in ingress client URLs - #245
Draft
Kayvan-Zahiri wants to merge 1 commit into
Draft
Kayvan-Zahiri wants to merge 1 commit into
Kayvan-Zahiri wants to merge 1 commit into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
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.
Object keys are interpolated directly into ingress URLs. A key such as
customer/123becomes two path segments;?starts the query,#moves the handler into a fragment, and a literal%2Fis interpreted as an escape instead of remaining part of the key.Percent-encode the object key as one path segment in both scoped and ordinary ingress routes. Existing service/handler routing and delayed-send query construction remain unchanged.
Added 28 in-memory HTTPX transport cases through
Client.generic_callandClient.generic_send: slash, question mark, fragment marker, literal percent escape, space, plain key, and Unicode, each with scoped/unscoped call/send variants. Before the fix, 16 fail and 12 controls pass. All 28 pass afterward, with request paths, fragments, delayed-send queries, payloads, and returned values checked.Validation on Python 3.12.12 with unchanged
uv.lockand all locked extras installed:tests/harness.py,tests/ext.py, andtests/servercontext.pyalso require Docker and were not run. The Docker daemon is unavailable, so full runtime/conformance results are not claimed.restate/client.pyand compiled native extension.git diff --checkpasses.No hosted Restate account or live ingress requests were used; request regressions use
httpx.MockTransport. This change addresses reserved characters in object keys; it does not change scope-name handling or empty/dot-segment keys.