Commit 38cfaa5f authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net/http: expand documentation of Server.MaxHeaderBytes

Clarify that it includes the RFC 7230 "request-line".

Fixes #15494

Change-Id: I9cc5dd5f2d85ebf903229539208cec4da5c38d04
Reviewed-on: https://go-review.googlesource.com/22656Reviewed-by: 's avatarAndrew Gerrand <adg@golang.org>
parent 4e0cd1ee
...@@ -2035,9 +2035,15 @@ type Server struct { ...@@ -2035,9 +2035,15 @@ type Server struct {
Handler Handler // handler to invoke, http.DefaultServeMux if nil Handler Handler // handler to invoke, http.DefaultServeMux if nil
ReadTimeout time.Duration // maximum duration before timing out read of the request ReadTimeout time.Duration // maximum duration before timing out read of the request
WriteTimeout time.Duration // maximum duration before timing out write of the response WriteTimeout time.Duration // maximum duration before timing out write of the response
MaxHeaderBytes int // maximum size of request headers, DefaultMaxHeaderBytes if 0
TLSConfig *tls.Config // optional TLS config, used by ListenAndServeTLS TLSConfig *tls.Config // optional TLS config, used by ListenAndServeTLS
// MaxHeaderBytes controls the maximum number of bytes the
// server will read parsing the request header's keys and
// values, including the request line. It does not limit the
// size of the request body.
// If zero, DefaultMaxHeaderBytes is used.
MaxHeaderBytes int
// TLSNextProto optionally specifies a function to take over // TLSNextProto optionally specifies a function to take over
// ownership of the provided TLS connection when an NPN // ownership of the provided TLS connection when an NPN
// protocol upgrade has occurred. The map key is the protocol // protocol upgrade has occurred. The map key is the protocol
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment