-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
httpcaddyfile: Ensure handle_path is sorted as equal to handle #3676
Conversation
aaea746
to
5474718
Compare
I'm so confused. Why is Edit: HUH? Reran locally and it spat out |
5474718
to
8fc3d2f
Compare
810c452
to
f2d3ae5
Compare
I hate Go's Well, now it should be deterministic. So that's helpful. I ran 10k iterations of the adapt tests before/after to make sure. |
f2d3ae5
to
f3e84c0
Compare
f3e84c0
to
9abfb69
Compare
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.
Just fixing a typo that was bothering me :)
Otherwise LGTM. I can see why this definitely isn't the most elegant fix, but it's pretty simple, hopefully it works well! If not, it's purely internal so we should be able to fix it up again if needed.
Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2b67952
to
274d0e9
Compare
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, I hate it. 🙃
Actually though I think this is worth a shot. There are worse parts of the Caddyfile adapter's internals, so...
Fixes an issue found in #3675
I don't love this fix frankly, any hard-coded logic is 😬 but I'm not sure of a better way to do this. We want
handle
andhandle_path
to have differentdirFunc
logic, but we need them to sort equivalently because they are both just handles, where one is just a shortcut to the other.Having done this, I think we could probably remove
handle_path
from the directive order since it'll never actually be seen by the sort function.