Skip to content

Commit 7eca372

Browse files
committed
util/network/http: Use cargo/1.2.3 user-agent header
... instead of `cargo 1.2.3`. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent#syntax declares that the product and product version are usually separated by a slash. This commit changes the cargo `User-Agent` header to follow that syntax instead of using whitespace for the separator.
1 parent b1b52aa commit 7eca372

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo/util/network/http.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ pub fn configure_http_handle(gctx: &GlobalContext, handle: &mut Easy) -> CargoRe
7474
if let Some(user_agent) = &http.user_agent {
7575
handle.useragent(user_agent)?;
7676
} else {
77-
handle.useragent(&format!("cargo {}", version()))?;
77+
handle.useragent(&format!("cargo/{}", version()))?;
7878
}
7979

8080
fn to_ssl_version(s: &str) -> CargoResult<SslVersion> {

0 commit comments

Comments
 (0)