Repository navigation
feat: match an optional header recorded with fewer values - #8
Closed
MarkRosemaker wants to merge 1 commit into
Closed
MarkRosemaker wants to merge 1 commit into
MarkRosemaker wants to merge 1 commit into
Conversation
A client builds Accept from the media types of its responses, so once a recording teaches it a new one, such as an error page's text/html, it sends more than the Accept recorded with that very call, and replay no longer matched it. An optional header recorded with a comma-separated list now matches a request that sends every value of it, and more. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019QCb1AfnATvpBQCH3PrX7Y
Owner
Author
|
Closing this unmerged. Clients are dropping Generated by Claude Code |
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.
Generated clients build
Acceptfrom the media types of their responses. When a recording teaches a client a new media type, the client sends more than theAcceptthat was recorded with that same call. yahoo-finance's new 502 recording is an example: itstext/htmlerror page means the client now sendsapplication/json, text/html, while the recording hasapplication/json. Replay therefore stopped matching the very recording that taught the client the new type.With this change, an
OptionalHeadersheader recorded with a comma-separated list also matches a request that sends every recorded value plus more. A request that drops a recorded value still fails to match. apitest already appliesOptionalHeaders("Accept"), so libraries only need the bump.I checked yahoo-finance against this branch, and its replay test passes again.
make readypasses.Generated by Claude Code