Skip to content

Commit

Permalink
meta: Remove serde_json feature from curl (#420)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MarijnS95 committed Jan 28, 2022
1 parent d0d5abc commit de429eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion sentry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ debug-logs = ["log_", "sentry-core/debug-logs"]
# transports
transport = ["reqwest", "native-tls"]
reqwest = ["reqwest_", "httpdate", "tokio"]
curl = ["curl_", "httpdate", "serde_json", "tokio"]
curl = ["curl_", "httpdate", "tokio"]
surf-h1 = ["surf_/h1-client", "httpdate"]
surf = ["surf_/curl-client", "httpdate", "tokio"]
native-tls = ["reqwest_/default-tls"]
Expand Down
1 change: 0 additions & 1 deletion sentry/src/transports/curl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ impl CurlHttpTransport {
let mut headers = curl::easy::List::new();
headers.append(&format!("X-Sentry-Auth: {}", auth)).unwrap();
headers.append("Expect:").unwrap();
headers.append("Content-Type: application/json").unwrap();
handle.http_headers(headers).unwrap();
handle.upload(true).unwrap();
handle.in_filesize(body.get_ref().len() as u64).unwrap();
Expand Down

0 comments on commit de429eb

Please sign in to comment.