From 1b55badc76c2fa2dce629ad891e7accd3a8082a7 Mon Sep 17 00:00:00 2001 From: TheSomeMan Date: Thu, 9 May 2024 17:24:00 +0700 Subject: [PATCH 1/2] Fix #1047: HTTP endpoint validation fails when 204 status code is returned --- components/esp32-wifi-manager | 2 +- main/http.c | 4 ++-- ruuvi.gwui.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/esp32-wifi-manager b/components/esp32-wifi-manager index 0ff72ada..78918440 160000 --- a/components/esp32-wifi-manager +++ b/components/esp32-wifi-manager @@ -1 +1 @@ -Subproject commit 0ff72ada5ff40518715872259d165ac209965b0d +Subproject commit 78918440751ef4bb7de4f89261595a0796a29820 diff --git a/main/http.c b/main/http.c index 4d30fa32..05f8b665 100644 --- a/main/http.c +++ b/main/http.c @@ -235,7 +235,7 @@ http_wait_until_async_req_completed_handle_http_resp( "HTTP GET Status = %d, content_length = %d", http_resp_code, esp_http_client_get_content_length(p_http_handle)); - if (HTTP_RESP_CODE_200 == http_resp_code) + if ((HTTP_RESP_CODE_200 <= http_resp_code) && (http_resp_code <= HTTP_RESP_CODE_299)) { if ((NULL != p_cb_info) && (NULL != p_cb_info->p_buf)) { @@ -661,7 +661,7 @@ http_async_poll(uint32_t* const p_malloc_fail_cnt) { const esp_http_client_http_status_code_t http_status = esp_http_client_get_status_code( p_http_async_info->p_http_client_handle); - if (HTTP_RESP_CODE_200 == http_status) + if ((HTTP_RESP_CODE_200 <= http_status) && (http_status <= HTTP_RESP_CODE_299)) { http_async_poll_handle_resp_ok(p_http_async_info, http_status); flag_success = true; diff --git a/ruuvi.gwui.html b/ruuvi.gwui.html index f3f05d3b..86e59b79 160000 --- a/ruuvi.gwui.html +++ b/ruuvi.gwui.html @@ -1 +1 @@ -Subproject commit f3f05d3b7c5adf1ad848c683aa215478460a51b5 +Subproject commit 86e59b79bfa4afb47bb6a36f9a309d0ba5eb5cc0 From 68328420bc609cbc142634cc0a800abff5afb350 Mon Sep 17 00:00:00 2001 From: TheSomeMan Date: Thu, 9 May 2024 18:16:52 +0700 Subject: [PATCH 2/2] [#1047] Update submodules to the master branch --- components/esp32-wifi-manager | 2 +- ruuvi.gwui.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp32-wifi-manager b/components/esp32-wifi-manager index 78918440..069d43ce 160000 --- a/components/esp32-wifi-manager +++ b/components/esp32-wifi-manager @@ -1 +1 @@ -Subproject commit 78918440751ef4bb7de4f89261595a0796a29820 +Subproject commit 069d43cec590251a25600b8e7b7f24ecb378fffb diff --git a/ruuvi.gwui.html b/ruuvi.gwui.html index 56cc9257..36c38279 160000 --- a/ruuvi.gwui.html +++ b/ruuvi.gwui.html @@ -1 +1 @@ -Subproject commit 56cc9257edbb9c5d5ca32adcb6addfb7b8d8a608 +Subproject commit 36c38279803ceeb8a71570aecfbf26c937da499e