Skip to content

StaticRequestHandler::handle() always returns true with fs = SPIFFS #4071

Closed
@michael-betz

Description

@michael-betz

... as a result, I never get a 404 error.

The underlying problem seems to be that a SPIFFS File object does not evaluate as false if it cannot be opened.

This diff for RequestHandlersImpl.h fixes it for me.

116c116
<         if (!f)
---
>         if (!f || !f.available())

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: StaleIssue is stale stage (outdated/stuck)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions