File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -128,8 +128,9 @@ func main() {
128128
129129 h2s := & http2.Server {}
130130 h1s := & http.Server {
131- Addr : * listen ,
132- Handler : h2c .NewHandler (http .DefaultServeMux , h2s ),
131+ Addr : * listen ,
132+ Handler : h2c .NewHandler (http .DefaultServeMux , h2s ),
133+ ReadHeaderTimeout : 5 * time .Second ,
133134 }
134135 if err := http2 .ConfigureServer (h1s , h2s ); err != nil {
135136 klog .Exitf ("http2.ConfigureServer: %v" , err )
Original file line number Diff line number Diff line change @@ -116,8 +116,9 @@ func main() {
116116
117117 h2s := & http2.Server {}
118118 h1s := & http.Server {
119- Addr : * listen ,
120- Handler : h2c .NewHandler (http .DefaultServeMux , h2s ),
119+ Addr : * listen ,
120+ Handler : h2c .NewHandler (http .DefaultServeMux , h2s ),
121+ ReadHeaderTimeout : 5 * time .Second ,
121122 }
122123 if err := http2 .ConfigureServer (h1s , h2s ); err != nil {
123124 klog .Exitf ("http2.ConfigureServer: %v" , err )
Original file line number Diff line number Diff line change @@ -103,8 +103,9 @@ func main() {
103103 // Run the HTTP server with the single handler and block until this is terminated
104104 h2s := & http2.Server {}
105105 h1s := & http.Server {
106- Addr : * listen ,
107- Handler : h2c .NewHandler (http .DefaultServeMux , h2s ),
106+ Addr : * listen ,
107+ Handler : h2c .NewHandler (http .DefaultServeMux , h2s ),
108+ ReadHeaderTimeout : 5 * time .Second ,
108109 }
109110 if err := http2 .ConfigureServer (h1s , h2s ); err != nil {
110111 klog .Exitf ("http2.ConfigureServer: %v" , err )
Original file line number Diff line number Diff line change @@ -123,8 +123,9 @@ func main() {
123123 // Run the HTTP server with the single handler and block until this is terminated
124124 h2s := & http2.Server {}
125125 h1s := & http.Server {
126- Addr : * listen ,
127- Handler : h2c .NewHandler (http .DefaultServeMux , h2s ),
126+ Addr : * listen ,
127+ Handler : h2c .NewHandler (http .DefaultServeMux , h2s ),
128+ ReadHeaderTimeout : 5 * time .Second ,
128129 }
129130 if err := http2 .ConfigureServer (h1s , h2s ); err != nil {
130131 klog .Exitf ("http2.ConfigureServer: %v" , err )
You can’t perform that action at this time.
0 commit comments