Problem
Hi, we’re seeing a regression with cargo publish against a third-party registry hosted on JFrog Artifactory:
it works with Cargo 1.95.0 but fails with Cargo 1.96.0 with 415 Unsupported Media Type.
This happens when publishing to an Artifactory-backed Cargo registry using a sparse index.
While investigating, I found commit 27cc6bd05889 ("Send a Content-Type header with cargo publish requests").
That commit adds Content-Type: application/octet-stream to the publish request for PUT /api/v1/crates/new. This looks like the most likely cause of the regression.
Was this header change intended as a strict protocol requirement for third-party registries, and is the expectation now that registries must accept application/octet-stream for publish requests?
If helpful, I can provide more detail on the registry setup and logs.
Steps
cargo publish
Possible Solution(s)
No response
Notes
Example config:
[registry]
default = "my-registry"
global-credential-providers = ["cargo:token"]
[registries.my-registry]
index = "sparse+https://<artifactory-host>/artifactory/api/cargo/<repo>/index/"
Version
cargo 1.96.0 (30a34c682 2026-05-25)
Problem
Hi, we’re seeing a regression with
cargo publishagainst a third-party registry hosted on JFrog Artifactory:it works with Cargo 1.95.0 but fails with Cargo 1.96.0 with
415 Unsupported Media Type.This happens when publishing to an Artifactory-backed Cargo registry using a sparse index.
While investigating, I found commit 27cc6bd05889 ("Send a Content-Type header with cargo publish requests").
That commit adds
Content-Type: application/octet-streamto the publish request forPUT /api/v1/crates/new. This looks like the most likely cause of the regression.Was this header change intended as a strict protocol requirement for third-party registries, and is the expectation now that registries must accept application/octet-stream for publish requests?
If helpful, I can provide more detail on the registry setup and logs.
Steps
cargo publishPossible Solution(s)
No response
Notes
Example config:
Version