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

Comments

@rsc
Copy link
Contributor

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

@gopherbot

This comment has been minimized.

Copy link

commented Aug 21, 2019

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

@gopherbot

This comment has been minimized.

Copy link

commented Aug 22, 2019

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

@gopherbot gopherbot closed this in 141b097 Sep 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.