s00500 / ESPUI

A simple web user interface library for ESP32 and ESP8266
https://valencia.lbsfilm.at/midterm-presentation/
Other
896 stars 166 forks source link

captivePortal bug #269

Open telesyst opened 9 months ago

telesyst commented 9 months ago

Describe the bug if captivePortal == true The connection from the Windows computer results in unstable work of device. Teted by tabbedGui.ino

I found the solution to the problem. It might not be the best.

    if (captivePortal)
    {
        request->redirect("/");
    }
    else
    {
        request->send(404);
    }

ESPUI.cpp rows 1270 and 1426

must be

    if (captivePortal && (strcmp(request->contentType().c_str(), "") == 0 ))
    {
        request->redirect("/");
    }
    else
    {
        request->send(404);
    }