Skip to content

Commit

Permalink
missing Content-Length fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefanuk12 committed May 28, 2023
1 parent 6533047 commit 25922a6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/installer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ pub async fn install_server(server: &Servers, target_dir: Option<&str>) {
// Create a reqwest client
let mut headers = header::HeaderMap::new();
headers.insert("User-Agent", header::HeaderValue::from_static("plutonium-manager"));

headers.insert("Accept-Encoding", header::HeaderValue::from_static("compress, deflate, gzip"));
let client = reqwest::Client::builder()
.default_headers(headers)
.build()
Expand Down Expand Up @@ -185,6 +185,7 @@ pub async fn install_iw4m(target_dir: Option<&str>) {
// Create a reqwest client
let mut headers = header::HeaderMap::new();
headers.insert("User-Agent", header::HeaderValue::from_static("plutonium-manager"));
headers.insert("Accept-Encoding", header::HeaderValue::from_static("compress, deflate, gzip"));

let client = reqwest::Client::builder()
.default_headers(headers)
Expand Down Expand Up @@ -216,6 +217,7 @@ pub async fn install_iw4m_config(target_dir: Option<&str>) {
// Create a reqwest client
let mut headers = header::HeaderMap::new();
headers.insert("User-Agent", header::HeaderValue::from_static("plutonium-manager"));
headers.insert("Accept-Encoding", header::HeaderValue::from_static("compress, deflate, gzip"));

let client = reqwest::Client::builder()
.default_headers(headers)
Expand All @@ -238,6 +240,7 @@ pub async fn install_iw4m_log(target_dir: Option<&str>) {
// Create a reqwest client
let mut headers = header::HeaderMap::new();
headers.insert("User-Agent", header::HeaderValue::from_static("plutonium-manager"));
headers.insert("Accept-Encoding", header::HeaderValue::from_static("compress, deflate, gzip"));

let client = reqwest::Client::builder()
.default_headers(headers)
Expand Down Expand Up @@ -271,7 +274,7 @@ pub async fn install_config(server: &Servers, target_dir: Option<&str>) {
// Create a reqwest client
let mut headers = header::HeaderMap::new();
headers.insert("User-Agent", header::HeaderValue::from_static("plutonium-manager"));
headers.insert("Accept-Encoding", header::HeaderValue::from_static(""));
headers.insert("Accept-Encoding", header::HeaderValue::from_static("compress, deflate, gzip"));

let client = reqwest::Client::builder()
.default_headers(headers)
Expand All @@ -293,6 +296,7 @@ pub async fn install_plutonium(target_dir: Option<&str>) {
// Create a reqwest client
let mut headers = header::HeaderMap::new();
headers.insert("User-Agent", header::HeaderValue::from_static("plutonium-manager"));
headers.insert("Accept-Encoding", header::HeaderValue::from_static("compress, deflate, gzip"));

let client = reqwest::Client::builder()
.default_headers(headers)
Expand Down Expand Up @@ -320,6 +324,7 @@ pub async fn install_rcon(target_dir: Option<&str>) {
// Create a reqwest client
let mut headers = header::HeaderMap::new();
headers.insert("User-Agent", header::HeaderValue::from_static("plutonium-manager"));
headers.insert("Accept-Encoding", header::HeaderValue::from_static("compress, deflate, gzip"));

let client = reqwest::Client::builder()
.default_headers(headers)
Expand Down

0 comments on commit 25922a6

Please sign in to comment.