diff --git a/src/http/client.rs b/src/http/client.rs index 734449765c3..5b8e8975749 100644 --- a/src/http/client.rs +++ b/src/http/client.rs @@ -101,7 +101,7 @@ pub struct EspHttpConnection { follow_redirects_policy: FollowRedirectsPolicy, event_handler: Box esp_err_t>>>, state: State, - request_content_len: u64, + request_content_len: i64, follow_redirects: bool, headers: BTreeMap, String>, content_len_header: UnsafeCell>>, @@ -246,7 +246,7 @@ impl EspHttpConnection { _ => false, }; - self.request_content_len = content_len.unwrap_or(0); + self.request_content_len = content_len.unwrap_or(-1); esp!(unsafe { esp_http_client_open(self.raw_client, self.request_content_len as _) })?;