Skip to content

Example WebServer WebServer.ino does not redirect when index.htm does not exist #9141

Closed
@Vic-Y

Description

@Vic-Y

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: ESP-12
  • Core Version:
  • Development Env: Arduino IDE
  • Operating System: Windows

Settings in IDE

  • Module: Wemos D1 mini (clone)
  • Flash Mode: DOUT
  • Flash Size: 4MB
  • lwip Variant: v2 Lower Memory
  • Reset Method:
  • Flash Frequency: 40Mhz
  • CPU Frequency: 80Mhz
  • Upload Using: SERIAL
  • Upload Speed: 921600

Problem Description

In handleRedirect() function (line 44 of WebServer.ino), redirect URL should be changed from "/$update.htm" to "/$upload.htm".

MCVE Current Sketch

  if (!LittleFS.exists(url)) { url = "/$update.htm"; }
  if (!LittleFS.exists(url)) { url = "/$upload.htm"; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions