Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net/http: minor optimization to copyValues #33744

Closed
rsc opened this issue Aug 20, 2019 · 2 comments
Closed

net/http: minor optimization to copyValues #33744

rsc opened this issue Aug 20, 2019 · 2 comments
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Aug 20, 2019

net/http has:

func copyValues(dst, src url.Values) {
	for k, vs := range src {
		for _, value := range vs {
			dst.Add(k, value)
		}
	}
}

This should probably be:

func copyValues(dst, src url.Values) {
	for k, vs := range src {
		dst[k] = append(dst[k], vs...)
	}
}

Noted on #33498

@rsc rsc added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. NeedsFix The path to resolution is known, but the work has not been done. labels Aug 20, 2019
@rsc rsc added this to the Go1.14 milestone Aug 20, 2019
@gopherbot gopherbot removed the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Aug 20, 2019
@gopherbot
Copy link

Change https://golang.org/cl/191057 mentions this issue: net/http: minor optimization to copyValues

@gopherbot
Copy link

Change https://golang.org/cl/191278 mentions this issue: Master

@golang golang locked and limited conversation to collaborators Sep 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants