Skip to content

Commit 8cad066

Browse files
ref(api): Don't set transfer encoding (#3058)
### Description Stop sending transfer encoding header. This allows us to support HTTP/2, which disallows the transfer encoding header, thereby unblocking #3057. Supposedly this was added to support gzipped uploads, but we manually compress files before they reach the transport layer for chunked uploads. Also, per the curl docs, this header only indicates to the server that we would like a [compressed response](https://curl.se/libcurl/c/CURLOPT_TRANSFER_ENCODING.html). I am not sure that Sentry honors this header, or that it is relevant, given we don't really download large files from Sentry in the CLI.
1 parent 73efd64 commit 8cad066

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

src/api/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,6 @@ impl Api {
239239
handle.ssl_verify_host(self.config.should_verify_ssl())?;
240240
handle.ssl_verify_peer(self.config.should_verify_ssl())?;
241241

242-
// This toggles gzipping, useful for uploading large files
243-
handle.transfer_encoding(self.config.allow_transfer_encoding())?;
244-
245242
let env = self.config.get_pipeline_env();
246243
let headers = self.config.get_headers();
247244

src/config.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,6 @@ impl Config {
310310
}
311311
}
312312

313-
/// Indicates whether uploads may use gzip transfer encoding.
314-
pub fn allow_transfer_encoding(&self) -> bool {
315-
let val = self.ini.get_from(Some("http"), "transfer_encoding");
316-
match val {
317-
None => true,
318-
Some(val) => val == "true",
319-
}
320-
}
321-
322313
/// Controls the SSL revocation check on windows. This can be used as a
323314
/// workaround for misconfigured local SSL proxies.
324315
pub fn disable_ssl_revocation_check(&self) -> bool {

0 commit comments

Comments
 (0)