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
HTTP_HOST not parsing port correctly at 2.X #2070
Comments
Originally I thought this was a non issue, because your code for the failing example uses I checked some rack versions:
The issue is likely related to the use of A potential fix would be adding |
Is there a definition of valid hostname characters and or formats from any RFCs? i.e. what is the standard we should be following? |
@jeremyevans Thanks for taking a look at it. The failing example with the protocol was my mistake. And as you tested it also fails without it. Also your point about valid dns hostnames makes sense and I wasn't considering it. The some_service host comes from docker compose which is a service we have and using underscore there is common practice however we could very easily use a dash instead of underscore and that would solve the issue but I wonder if rack 2.2 behavior compared to 2.1 or even 3.0 is not a regression.
|
This makes Rack 2.2 behavior similar to Rack 2.1 and Rack 3.0 in regards to underscore in host names.
I submitted #2071 to change the Rack 2.2 behavior to align with Rack 2.1 and 3.0. I'm not saying with the behavior is correct, but this at least makes it consistent. |
The proposed fix was merged. |
Released rack 2.2.7 with the fix. |
Hello, I think we might have a regression from this PR #1606.
With Rack 2.1.4.3 (Rack 3.X also works as expected)
With Rack 2.2.6.4 (But any version at 2.2.X will behave the same way)
Am I missing something here?
Ruby: 2.7.8
Rails 7.0.4
The text was updated successfully, but these errors were encountered: