-
Notifications
You must be signed in to change notification settings - Fork 18.2k
net/http: reduce allocs in CrossOriginProtection.Check #74251
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
Conversation
Rather than repeatedly creating error values on CrossOriginProtection.Check's unhappy paths, return non-exported and effectively constant error variables.
This PR (HEAD: e704d63) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/681178. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/681178. |
Message from jub0bs: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/681178. |
Message from qiu laidongfeng2: Patch Set 1: Code-Review+1 Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/681178. |
Message from Go LUCI: Patch Set 1: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-06-17T15:26:58Z","revision":"c8196b5bf674241264a2cdf9f21365840629b2b8"} Please don’t reply on this GitHub thread. Visit golang.org/cl/681178. |
Message from qiu laidongfeng2: Patch Set 1: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/681178. |
Message from Go LUCI: Patch Set 1: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/681178. |
Message from Go LUCI: Patch Set 1: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/681178. |
Message from Sean Liao: Patch Set 1: Auto-Submit+1 Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/681178. |
Message from Dmitri Shuralyov: Patch Set 1: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/681178. |
Message from Junyang Shao: Patch Set 2: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/681178. |
Rather than repeatedly creating error values on CrossOriginProtection.Check's unhappy paths, return non-exported and effectively constant error variables. For #73626. Change-Id: Ibaa036c29417071b3601b8d200ab0902359d1bb9 GitHub-Last-Rev: e704d63 GitHub-Pull-Request: #74251 Reviewed-on: https://go-review.googlesource.com/c/go/+/681178 Reviewed-by: Sean Liao <[email protected]> Reviewed-by: qiu laidongfeng2 <[email protected]> Reviewed-by: Junyang Shao <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
This PR is being closed because golang.org/cl/681178 has been merged. |
Rather than repeatedly creating error values on
CrossOriginProtection.Check's unhappy paths, return non-exported and
effectively constant error variables.
For #73626.