Standard library / net/http
http.DefaultMaxHeaderBytes
Default server request header size limit when MaxHeaderBytes is zero. It is not a request body limit. Expected stdout: '1048576\n'.
Formal Syntax & Structure
go syntaxgo
const DefaultMaxHeaderBytes = 1 << 20Working Example
Example Snippetgo
package main
import ( "fmt" "net/http")
func main() { fmt.Println(http.DefaultMaxHeaderBytes) }
func must[T any](v T, e error) T { if e != nil { panic(e) } return v}func check(e error) { if e != nil { panic(e) }}