Skip to content

fallback onto index.html if index.htm fails #2614

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

Merged
merged 6 commits into from
Oct 29, 2019
Merged

Conversation

gtalusan
Copy link
Contributor

Check SPIFFS to see if index.htm and if not then try index.html.

@codecov-io
Copy link

Current coverage is 27.80% (diff: 100%)

Merging #2614 into master will not change coverage

@@             master      #2614   diff @@
==========================================
  Files            20         20          
  Lines          3625       3625          
  Methods         335        335          
  Messages          0          0          
  Branches        656        656          
==========================================
  Hits           1008       1008          
  Misses         2441       2441          
  Partials        176        176          

Powered by Codecov. Last update 4897e00...92eb9d4

@earlephilhower earlephilhower added this to the 2.6.0 milestone Oct 8, 2019
@earlephilhower
Copy link
Collaborator

Simple and small. Should either be merges 2.6 or closed as won't add.

I like it, could be useful as people move from old SD apps (8.3) to new ones (LFN).

@devyte devyte self-assigned this Oct 15, 2019
@devyte devyte merged commit 9f2cfb8 into esp8266:master Oct 29, 2019
@kolos
Copy link

kolos commented Nov 16, 2019

So THIS broke my *.htm.gz requests..

File uploaded as: dashboard.htm.gz
Http request: http://server/dashboard.htm
Actually served

  • Before: dashboard.htm OR dashboard.htm.gz => file found
  • After: dashboard.htm OR dashboard.html OR dashboard.html.gz => file not found

Not a big issue, had to rename the files.
Just a FYI if someone else searches for this.

@earlephilhower
Copy link
Collaborator

Can you open a bug on that, @kolos. We should be checking if the HTML file actually exists before silently upgrading the request.

@kolos
Copy link

kolos commented Nov 16, 2019

Sure: #6792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants