mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
fix(http_server): Fixed response status code for temporary redirect
Closes https://github.com/espressif/esp-idf/issues/17791
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user