Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
michael-betz opened this issue Jun 8, 2020 · 3 comments
Closed
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@michael-betz
Copy link
Contributor

... 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())
@lbernstone
Copy link
Contributor

Please submit a pull request. You can edit the code right on the page you linked.

@stale
Copy link

stale bot commented Aug 7, 2020

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Aug 7, 2020
@stale
Copy link

stale bot commented Aug 21, 2020

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Aug 21, 2020
me-no-dev pushed a commit that referenced this issue Sep 30, 2020
SPIFFS File object evaluates as true even if the file could not be opened.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

2 participants