From 29d1bfb9507b1b5fc68e755c7b89d61fb2d7bb7b Mon Sep 17 00:00:00 2001 From: "hrushikesh.bhosale" Date: Mon, 3 Nov 2025 14:43:04 +0530 Subject: [PATCH] fix(http_server): Fixed response status code for temporary redirect Closes https://github.com/espressif/esp-idf/issues/17791 --- examples/protocols/http_server/captive_portal/main/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/protocols/http_server/captive_portal/main/main.c b/examples/protocols/http_server/captive_portal/main/main.c index 787003c4ea..b52040e1dd 100644 --- a/examples/protocols/http_server/captive_portal/main/main.c +++ b/examples/protocols/http_server/captive_portal/main/main.c @@ -127,7 +127,7 @@ static const httpd_uri_t root = { esp_err_t http_404_error_handler(httpd_req_t *req, httpd_err_code_t err) { // Set status - httpd_resp_set_status(req, "302 Temporary Redirect"); + httpd_resp_set_status(req, "303 See Other"); // Redirect to the "/" root directory httpd_resp_set_hdr(req, "Location", "/"); // iOS requires content in the response to detect a captive portal, simply redirecting is not sufficient.