diff --git a/Cargo.lock b/Cargo.lock index 9a1a78c..9436ea5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3633,7 +3633,7 @@ dependencies = [ [[package]] name = "trifid-api" -version = "0.1.1" +version = "0.1.2" dependencies = [ "actix-cors", "actix-request-identifier", diff --git a/tfcli/Cargo.toml b/tfcli/Cargo.toml index c94d529..fbebddd 100644 --- a/tfcli/Cargo.toml +++ b/tfcli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tfcli" -version = "0.1.0" +version = "0.1.1" edition = "2021" description = "Command-line client for managing trifid-api" license = "GPL-3.0-or-later" @@ -19,4 +19,4 @@ tokio = { version = "1", features = ["full"] } dirs = "5.0.1" qr2term = "0.3.1" ipnet = "2.7.2" -serde_json = "1.0.96" \ No newline at end of file +serde_json = "1.0.96" diff --git a/tfcli/src/host.rs b/tfcli/src/host.rs index 57a1ac7..d550f80 100644 --- a/tfcli/src/host.rs +++ b/tfcli/src/host.rs @@ -375,7 +375,7 @@ pub async fn enroll_host(id: String, server: Url) -> Result<(), Box> let token = format!("{} {}", session_token, auth_token); - let res = client.post(server.join(&format!("/v1/hosts/{}/enrollment-code", id))?).bearer_auth(token).send().await?; + let res = client.post(server.join(&format!("/v1/hosts/{}/enrollment-code", id))?).header("content-length", 0).bearer_auth(token).send().await?; if res.status().is_success() { let resp: EnrollmentResponse = res.json().await?; @@ -637,4 +637,4 @@ pub async fn unset_override(id: String, key: String, server: Url) -> Result<(), } Ok(()) -} \ No newline at end of file +}