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
[0.23] Error parsing address from Jetty with ipv6 #4952
Comments
[hangs head in shame for using This looks related to jetty/jetty.project#1503. Rather than say Jetty or ip4s is wrong, I'd say http4s is wrong for assuming they agree. I think we should strip brackets before that call. Arguably, ip4s should handle both, like the Java APIs. But that's up to @mpilquist. |
No strong opinions. At first glance, I'd say that bracketed v6 is part of the URI RFC, not IPv6, and hence the brackets should be removed prior to calling |
I think this Jetty comment summarizes the grim situation from the specs. Since I used it as a drop-in for the Java libraries, the argument that it should be compatible with the Java libraries seems good to me. Regardless, I think we should fix it here and not rely on the generosity of ip4s' parser. |
😱 |
@san-coding I don't think anybody has taken this up, if you're still looking for one. |
Thanks ross, yes I am looking forward to contribute , I am always refreshing the issues page and looking for issues I can contribute to |
@rossabaker @mpilquist , I have figured out that I have to change this file servlet/src/main/scala/org/http4s/servlet/Http4sServlet.scala , could you help me out on what changes I should make |
@rossabaker @mpilquist , Is this where I should make changes ? Should we call the http4s/servlet/src/main/scala/org/http4s/servlet/Http4sServlet.scala Lines 112 to 119 in 453221b
|
I'm sorry. That |
Ohh okay , thanks |
Running http4s 0.23.0-RC1 with Jetty and IPv6 crashes with the following:
The issue is that Jetty returns the following addresses:
This crashes the following parsing
IpAddress.fromString(req.getRemoteAddr).get
in Http4sServlet. Is brackets on the address considered an error on the parsing side or on Jetty's side?A temporary workaround for us is to force ipv4 with
-Djava.net.preferIPv4Stack=true
.The text was updated successfully, but these errors were encountered: