fix(http_server): Fixed response status code for temporary redirect

Closes https://github.com/espressif/esp-idf/issues/17791
This commit is contained in:
hrushikesh.bhosale
2025-11-03 14:43:04 +05:30
parent 811e27118d
commit fea4723a11
@@ -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.