Skip to content

net/http: Request.WithContext should deep copy all pointer/map fields #23544

Closed
@taralx

Description

@taralx

Right now WithContext deep-copies URL only. At minimum, it should also deep-copy Headers for the same reason. For some reason the code distinguishes URL because it is "not a map", but maps are also pointer types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.early-in-cycleA change that should be done early in the 3 month dev cycle.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions