Skip to content

Commit 39c32aa

Browse files
committed
meta: Remove serde_json feature from curl
Curl doesn't need `serde_json` support since Sentry already serializes envelopes to a vector of bytes internally. Likewise no other transport sets the `Content-Type: application/json` header, presumably because the data is multiple json objects concatenated together.
1 parent d0d5abc commit 39c32aa

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

Diff for: sentry/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ debug-logs = ["log_", "sentry-core/debug-logs"]
3939
# transports
4040
transport = ["reqwest", "native-tls"]
4141
reqwest = ["reqwest_", "httpdate", "tokio"]
42-
curl = ["curl_", "httpdate", "serde_json", "tokio"]
42+
curl = ["curl_", "httpdate", "tokio"]
4343
surf-h1 = ["surf_/h1-client", "httpdate"]
4444
surf = ["surf_/curl-client", "httpdate", "tokio"]
4545
native-tls = ["reqwest_/default-tls"]

Diff for: sentry/src/transports/curl.rs

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ impl CurlHttpTransport {
6363
let mut headers = curl::easy::List::new();
6464
headers.append(&format!("X-Sentry-Auth: {}", auth)).unwrap();
6565
headers.append("Expect:").unwrap();
66-
headers.append("Content-Type: application/json").unwrap();
6766
handle.http_headers(headers).unwrap();
6867
handle.upload(true).unwrap();
6968
handle.in_filesize(body.get_ref().len() as u64).unwrap();

0 commit comments

Comments
 (0)