-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fix errors with index handling; permit multiple indexes. #98
base: master
Are you sure you want to change the base?
Conversation
@coderhaoxin @jonathanong This PR has some tests that I think will highlight weaknesses in the current code. Even if you don't like my solution, the current code should be fixed. |
can you split these tests code to a separate PR ~ BTW, do you really need such a big change to implement your feature ? 😢 |
@coderhaoxin My new feature accounts for only about 1 line of that code. The rest is a bug fix. The reality is that you currently support an open-ended number of index files, but your code doesn't account for that correctly. This PR also supports an open-ended number of index files, but accounts for them all correctly (so I say). I could alter lines 76-77 to reduce the possible permutations back to current spec. But I would leave the rest of the code. commit 46c4c93 has the tests to expose current misbehavior. (I haven't actually tested the tests.) |
This allows options.index to be an array of indexes, prioritized by list order.
It also removes a pretty obscure error whereby
could serve
path/to/index.html/index