Skip to content

Commit 101997e

Browse files
KristofferCKristofferC
andauthored
keep using gzip on Windows for the registry (#4496)
Co-authored-by: KristofferC <[email protected]>
1 parent db3e6f0 commit 101997e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/PlatformEngines.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,14 @@ function get_metadata_headers(url::AbstractString)
263263

264264
# Add Accept-Encoding header only for compressed archive resources
265265
# (registries, packages, artifacts - not for metadata endpoints like /registries or /meta)
266+
# Don't use zstd for registries on Windows due to backwards compatibility with older Julia versions
267+
# (7z can't decompress zstd until v17.6, older Julia versions on Windows only have 7z available)
266268
if occursin(r"/(registry|package|artifact)/", url)
267-
push!(headers, "Accept-Encoding" => "zstd, gzip")
269+
if Sys.iswindows() && occursin(r"/registry/", url)
270+
# Skip zstd for registries on Windows
271+
else
272+
push!(headers, "Accept-Encoding" => "zstd, gzip")
273+
end
268274
end
269275

270276
for (key, val) in ENV

0 commit comments

Comments
 (0)