Skip to content

Commit

Permalink
Additional error handling improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
eandersson committed Nov 5, 2024
1 parent 953c9e1 commit 2fdbbd3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions main/http_server/http_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static esp_err_t handle_options_request(httpd_req_t * req)
// Set CORS headers for OPTIONS request
if (set_cors_headers(req) != ESP_OK) {
httpd_resp_send_500(req);
return ESP_FAIL;
return ESP_OK;
}

// Send a blank response for OPTIONS request
Expand All @@ -212,7 +212,7 @@ static esp_err_t PATCH_update_settings(httpd_req_t * req)
// Set CORS headers
if (set_cors_headers(req) != ESP_OK) {
httpd_resp_send_500(req);
return ESP_FAIL;
return ESP_OK;
}

int total_len = req->content_len;
Expand Down Expand Up @@ -318,7 +318,6 @@ static esp_err_t POST_restart(httpd_req_t * req)
return ESP_OK;
}


/* Simple handler for getting system handler */
static esp_err_t GET_system_info(httpd_req_t * req)
{
Expand All @@ -327,7 +326,7 @@ static esp_err_t GET_system_info(httpd_req_t * req)
// Set CORS headers
if (set_cors_headers(req) != ESP_OK) {
httpd_resp_send_500(req);
return ESP_FAIL;
return ESP_OK;
}


Expand Down

0 comments on commit 2fdbbd3

Please sign in to comment.