[go] net/http: apply Server.MaxHeaderValueCount towards HTTP/1 trailer headers

0 views
Skip to first unread message

Nicholas Husin (Gerrit)

unread,
2:03 PM (5 hours ago) 2:03 PM
to goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Nicholas Husin, Damien Neil, golang...@luci-project-accounts.iam.gserviceaccount.com, golang-co...@googlegroups.com

Nicholas Husin submitted the change

Change information

Commit message:
net/http: apply Server.MaxHeaderValueCount towards HTTP/1 trailer headers

This is a follow-up to CL 795460, in which Server.MaxHeaderValueCount
was added, allowing a Server to limit the number of headers that it is
willing to accept.

In CL 795460, Server.MaxHeaderValueCount is applied to trailer headers
only for HTTP/2 servers, mostly because of the existing code structure
around Server.MaxHeaderBytes. This CL makes it so that
Server.MaxHeaderValueCount is applied to trailer headers in HTTP/1 too.

For #79936
Change-Id: I0ab9d1ac03fe05474b6d4d36c16586396a6a6964
Reviewed-by: Damien Neil <dn...@google.com>
Reviewed-by: Nicholas Husin <hu...@google.com>
Files:
  • M src/net/http/request.go
  • M src/net/http/response.go
  • M src/net/http/serve_test.go
  • M src/net/http/transfer.go
Change size: S
Delta: 4 files changed, 23 insertions(+), 16 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I0ab9d1ac03fe05474b6d4d36c16586396a6a6964
Gerrit-Change-Number: 796400
Gerrit-PatchSet: 3
Gerrit-Owner: Nicholas Husin <n...@golang.org>
Gerrit-Reviewer: Damien Neil <dn...@google.com>
Gerrit-Reviewer: Nicholas Husin <hu...@google.com>
Gerrit-Reviewer: Nicholas Husin <n...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages