Skip to content

Commit ad5560d

Browse files
iansltxlukeheath
authored andcommitted
Exempt bootstrap package uploads from server-side request timeout (#25536)
For #25533 - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] A detailed QA plan exists on the associated ticket (if it isn't there, work with the product group's QA engineer to add it) - [x] Manual QA for all new/changed functionality
1 parent 0a1d828 commit ad5560d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Removed request timeout on bootstrap package uploads for consistency with software package upload endpoints

cmd/fleet/serve.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1183,10 +1183,11 @@ the way that the Fleet server works.
11831183
}
11841184

11851185
if (req.Method == http.MethodPost && strings.HasSuffix(req.URL.Path, "/fleet/software/package")) ||
1186-
(req.Method == http.MethodPatch && strings.HasSuffix(req.URL.Path, "/package") && strings.Contains(req.URL.Path, "/fleet/software/titles/")) {
1186+
(req.Method == http.MethodPatch && strings.HasSuffix(req.URL.Path, "/package") && strings.Contains(req.URL.Path, "/fleet/software/titles/")) ||
1187+
(req.Method == http.MethodPost && strings.HasSuffix(req.URL.Path, "/bootstrap")) {
11871188
var zeroTime time.Time
11881189
rc := http.NewResponseController(rw)
1189-
// For large software installers, the server time needs time to read the full
1190+
// For large software installers and bootstrap packages, the server time needs time to read the full
11901191
// request body so we use the zero value to remove the deadline and override the
11911192
// default read timeout.
11921193
// TODO: Is this really how we want to handle this? Or would an arbitrarily long

0 commit comments

Comments
 (0)