diff --git a/main/http_server/http_server.c b/main/http_server/http_server.c index 2c5afb9ac..f43f5d8ec 100644 --- a/main/http_server/http_server.c +++ b/main/http_server/http_server.c @@ -181,7 +181,7 @@ static esp_err_t rest_common_get_handler(httpd_req_t * req) httpd_resp_sendstr_chunk(req, NULL); /* Respond with 500 Internal Server Error */ httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to send file"); - return ESP_FAIL; + return ESP_OK; } } } while (read_bytes > 0); @@ -208,14 +208,14 @@ static esp_err_t PATCH_update_swarm(httpd_req_t * req) if (total_len >= SCRATCH_BUFSIZE) { /* Respond with 500 Internal Server Error */ httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "content too long"); - return ESP_FAIL; + return ESP_OK; } while (cur_len < total_len) { received = httpd_req_recv(req, buf + cur_len, total_len); if (received <= 0) { /* Respond with 500 Internal Server Error */ httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to post control value"); - return ESP_FAIL; + return ESP_OK; } cur_len += received; } @@ -255,14 +255,14 @@ static esp_err_t PATCH_update_settings(httpd_req_t * req) if (total_len >= SCRATCH_BUFSIZE) { /* Respond with 500 Internal Server Error */ httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "content too long"); - return ESP_FAIL; + return ESP_OK; } while (cur_len < total_len) { received = httpd_req_recv(req, buf + cur_len, total_len); if (received <= 0) { /* Respond with 500 Internal Server Error */ httpd_resp_send_err(req, HTTPD_500_INTERNAL_SERVER_ERROR, "Failed to post control value"); - return ESP_FAIL; + return ESP_OK; } cur_len += received; }