Skip to content

http2: make server push transfers inherit share from parent - #22488

Closed
bagder wants to merge 2 commits into
masterfrom
bagder/h2-push-share
Closed

http2: make server push transfers inherit share from parent#22488
bagder wants to merge 2 commits into
masterfrom
bagder/h2-push-share

Conversation

@bagder

@bagder bagder commented Aug 5, 2026

Copy link
Copy Markdown
Member

No description provided.

@bagder bagder added the HTTP/2 label Aug 5, 2026
@github-actions github-actions Bot added the HTTP label Aug 5, 2026
@bagder
bagder marked this pull request as ready for review August 5, 2026 08:28
@bagder
bagder requested a lite review from Copilot August 5, 2026 08:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to ensure HTTP/2 server-push transfers created via handle duplication inherit the parent transfer’s share object, so pushed transfers participate in the same shared state (e.g., cookies/HSTS/PSL/DNS caches) as the initiating request.

Changes:

  • In lib/http2.c, assign the parent share to the duplicated easy handle and increment the share refcount.
  • In lib/curl_share.c / lib/curl_share.h, make the share refcount increment helper (Curl_share_ref_inc) non-static and callable from other translation units.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
lib/http2.c Adds share inheritance logic for duplicated handles used by HTTP/2 server push.
lib/curl_share.h Exposes Curl_share_ref_inc() declaration for cross-file use.
lib/curl_share.c Renames and exports the refcount increment function and updates its call site.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/http2.c Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@bagder bagder closed this in 90325ff Aug 5, 2026
@bagder
bagder deleted the bagder/h2-push-share branch August 5, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants