s00500 / ESPUI

A simple web user interface library for ESP32 and ESP8266

Home Page:https://valencia.lbsfilm.at/midterm-presentation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

captivePortal bug

telesyst opened this issue · comments

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);
    }