Repository navigation
remove conn->given - #22875
Closed
icing wants to merge 1 commit into
Closed
remove conn->given#22875icing wants to merge 1 commit into
icing wants to merge 1 commit into
Conversation
The `connectdata` member `given` is always the same as `conn->origin->scheme`. It never changes. Remove that member and always use the origin scheme instead.
There was a problem hiding this comment.
🟢 Approval recommended
The refactor cleanly removes conn->given and all repository references were updated consistently without introducing new call sites or leaving stale usages.
Pull request overview
This PR removes the internal connectdata->given scheme pointer and consistently uses conn->origin->scheme as the “initial / requested” scheme, aligning the implementation with the invariant described in the PR metadata.
Changes:
- Removed
const struct Curl_scheme *givenfromstruct connectdata. - Updated connection scheme setup to use
conn->origin->schemedirectly. - Replaced remaining
conn->givenreferences in reuse logging and HTTP/2 / HTTPSig authority handling withconn->origin->scheme.
File summaries
| File | Description |
|---|---|
| lib/urldata.h | Removes the connectdata.given member from the connection struct. |
| lib/url.c | Adjusts scheme selection and reuse logging to reference conn->origin->scheme instead of conn->given. |
| lib/http2.c | Uses cf->conn->origin->scheme->defport for PUSH_PROMISE authority validation. |
| lib/http_httpsig.c | Uses conn->origin->scheme->defport when forming the HTTPSig authority. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
The
connectdatamembergivenis always the same asconn->origin->scheme. It never changes. Remove that member and always use the origin scheme instead.