From 1aea1b68aa45c50f4bdc1f4cb66e3a3f2cbe808d Mon Sep 17 00:00:00 2001 From: JGStew Date: Tue, 2 Aug 2022 19:51:06 -0400 Subject: [PATCH] Fix URLGetter.py when default windows curl is used. (#816) Fix URLGetter for cases where default windows curl is used. --- Code/autopkglib/URLGetter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Code/autopkglib/URLGetter.py b/Code/autopkglib/URLGetter.py index 60b276926..e59188934 100644 --- a/Code/autopkglib/URLGetter.py +++ b/Code/autopkglib/URLGetter.py @@ -19,7 +19,7 @@ import os.path import subprocess -from autopkglib import Processor, ProcessorError, find_binary +from autopkglib import Processor, ProcessorError, find_binary, is_windows __all__ = ["URLGetter"] @@ -51,6 +51,9 @@ def curl_binary(self): def prepare_curl_cmd(self): """Assemble basic curl command and return it.""" + if is_windows() and "windows\\system32" in self.curl_binary().lower(): + # if using windows default curl, --compressed is not supported + return [self.curl_binary(), "--location"] return [self.curl_binary(), "--compressed", "--location"] def add_curl_headers(self, curl_cmd, headers):