Skip to content

Commit 76c63bf

Browse files
cgzonesclaude
andcommitted
Treat application/x-gzip as equivalent to application/gzip
Avoids a spurious Content-Type mismatch warning for mirrors (e.g. NVIDIA CUDA repos) that advertise the legacy non-standard alias. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b187cfa commit 76c63bf

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,11 @@ pub(crate) fn warn_on_content_type_mismatch(
259259
{
260260
return;
261261
}
262+
// `application/x-gzip` is the legacy non-standard alias for the
263+
// IANA-registered `application/gzip` (RFC 6713); treat them as equivalent.
264+
if expected == "application/gzip" && upstream_ct.eq_ignore_ascii_case("application/x-gzip") {
265+
return;
266+
}
262267
warn_once_or_info!(
263268
"Upstream Content-Type `{upstream_ct}` differs from expected `{expected}` for {debname} from {mirror}"
264269
);

0 commit comments

Comments
 (0)