-
-
Notifications
You must be signed in to change notification settings - Fork 225
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
Cannot match hostnames shorter than 4 chars #748
Comments
The shortest valid minimum HTTP hostname is at least 11 characters long (http://a.bc) which is why the code is hardcoded to start checking a pathname after the first 11 characters for optimization. Can you give me some uses of the non-standard HTTP hostname? |
Internet hosts can be as short as one character (rfc1123#2.1) and above usage can be at least used in loopback and container-to-container scenarios (where no public DNS resolver is involved) so it is valid. I've checked and the difference is less than the magnitude of pico-seconds to check more chars, BTW feel free to close the issue if feel it is not a valid case for Elysia. |
I agree Elysia should remove these kind of optimizations in favor of correctness. Skipping 11 characters doesn’t make any difference other than in artificial benchmarks |
We start an implementation of a non-default If you have more use-case, feels free to open a new discussion on discussion tab. |
What version of Elysia.JS is running?
1.1.3
What platform is your computer?
Darwin 24.0.0 arm64 arm
What steps can reproduce the bug?
What is the expected behavior?
What do you see instead?
Additional information
It seems issue rases from here since path parsing starts at char
11
of URL (i think assuming there is alwaysh:p
(host port)The text was updated successfully, but these errors were encountered: