Skip to content

context: give Clone its own request Header and URL - #75

Open
team-humaki wants to merge 1 commit into
h2non:masterfrom
team-humaki:context-clone-independent-request
Open

team-humaki wants to merge 1 commit into
h2non:masterfrom
team-humaki:context-clone-independent-request

Conversation

@team-humaki

Copy link
Copy Markdown

Clone was a shallow copy of http.Request, so Header and URL were shared with the original. Concurrent Clone + BodyString/SetHeader/Send (the pattern in #39) raced on those maps.

Use Request.Clone and copy response headers so each clone can mutate request fields independently.

Fixes #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Data Race with Clone

1 participant