Merge pull request #7286 from fuweid/follow-up-7254
Follow up #7254 (Switch to Go 1.19)
This commit is contained in:
		| @@ -3,10 +3,13 @@ | |||||||
|  |  | ||||||
| /* | /* | ||||||
|    Copyright The containerd Authors. |    Copyright The containerd Authors. | ||||||
|  |  | ||||||
|    Licensed under the Apache License, Version 2.0 (the "License"); |    Licensed under the Apache License, Version 2.0 (the "License"); | ||||||
|    you may not use this file except in compliance with the License. |    you may not use this file except in compliance with the License. | ||||||
|    You may obtain a copy of the License at |    You may obtain a copy of the License at | ||||||
|  |  | ||||||
|        http://www.apache.org/licenses/LICENSE-2.0 |        http://www.apache.org/licenses/LICENSE-2.0 | ||||||
|  |  | ||||||
|    Unless required by applicable law or agreed to in writing, software |    Unless required by applicable law or agreed to in writing, software | ||||||
|    distributed under the License is distributed on an "AS IS" BASIS, |    distributed under the License is distributed on an "AS IS" BASIS, | ||||||
|    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||||
|   | |||||||
| @@ -165,7 +165,8 @@ func NewServer(config Config, runtime Runtime) (Server, error) { | |||||||
| 		Addr:      s.config.Addr, | 		Addr:      s.config.Addr, | ||||||
| 		Handler:   s.handler, | 		Handler:   s.handler, | ||||||
| 		TLSConfig: s.config.TLSConfig, | 		TLSConfig: s.config.TLSConfig, | ||||||
| 		ReadHeaderTimeout: 3 * time.Second, // Fix linter G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server | 		// TODO(fuweid): allow user to configure streaming server | ||||||
|  | 		ReadHeaderTimeout: 30 * time.Minute, // Fix linter G112: Potential Slowloris Attack because ReadHeaderTimeout is not configured in the http.Server | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	return s, nil | 	return s, nil | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Phil Estes
					Phil Estes