-
Notifications
You must be signed in to change notification settings - Fork 7
Delegate primary script pathfinding and loading to PHP #7
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
Conversation
.strip_prefix("/") | ||
.map_err(EmbedException::RelativizeError)?; | ||
|
||
match docroot.join(relative_uri).join("index.php").canonicalize() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it always look for index.php file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment, yes. It tries path + 'index.php'
and, if it does not exist, tries path
alone. It currently works in that order as it just checks existence and not that it is a file, so a directory would canonicalize also. I need to improve this a bit, but this part is a bit in-progress right now as I restructure it to resolve paths better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
The tests will also need adjusting. Haven't fixed them yet to use the new design. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with green CI
This fixes three issues:
ResponseBuilder.header(...)
method needs to append headers, not replace them