From 5f628a1c5998a78ab97feba1f727674d736f0291 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana-Espinoza Date: Wed, 26 Mar 2025 17:19:22 -0400 Subject: [PATCH] remove the standard timeout for software installer downloads (#27550) > For #27548 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [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 --- changes/27548-installer-download-fail | 1 + cmd/fleet/serve.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changes/27548-installer-download-fail diff --git a/changes/27548-installer-download-fail b/changes/27548-installer-download-fail new file mode 100644 index 0000000000..2e50e737a4 --- /dev/null +++ b/changes/27548-installer-download-fail @@ -0,0 +1 @@ +- Fixed software installer download errors by extending the timeout for the download endpoints. \ No newline at end of file diff --git a/cmd/fleet/serve.go b/cmd/fleet/serve.go index 277861d21b..699575e7d9 100644 --- a/cmd/fleet/serve.go +++ b/cmd/fleet/serve.go @@ -1218,7 +1218,9 @@ the way that the Fleet server works. if (req.Method == http.MethodPost && strings.HasSuffix(req.URL.Path, "/fleet/software/package")) || (req.Method == http.MethodPatch && strings.HasSuffix(req.URL.Path, "/package") && strings.Contains(req.URL.Path, "/fleet/software/titles/")) || - (req.Method == http.MethodPost && strings.HasSuffix(req.URL.Path, "/bootstrap")) { + (req.Method == http.MethodPost && strings.HasSuffix(req.URL.Path, "/bootstrap")) || + (req.Method == http.MethodGet && strings.Contains(req.URL.Path, "/package/token")) || + (req.Method == http.MethodPost && strings.Contains(req.URL.Path, "orbit/software_install/package")) { var zeroTime time.Time rc := http.NewResponseController(rw) // For large software installers and bootstrap packages, the server time needs time to read the full