-
Notifications
You must be signed in to change notification settings - Fork 412
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
UserAgent regex broken in ScalaJS #2707
Comments
Is this actually a zio http error? It seems like valid scala code is producing invalid js code. Is this a scalajs bug? |
Regex's that are used in both JS and the JVM, must be compatible with both. No way around there being two different Regex engines. |
@jamesward that's my point. I as a lib dev should not make sure that my regex works for both. That should be the scala js compiler/transpiler |
I agree. But unfortunately I don't think Scala has any plans to write their own Regex engine. So the reality for now is that users have to write Regex that works on their target platforms. |
Related (Almost decade-old) thread- |
Okay 🙄 At least the issue is clear now. One way around would be to not use regex at all for the header parsing but |
Would zio-parser be a viable option? One possible win would be that it is invertible. |
|
/bounty $250 |
|
/attempt #2707
|
💡 @pablf submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
🎉🎈 @pablf has been awarded $250! 🎈🎊 |
Describe the bug
This blows up when its referenced in the browser.
zio-http/zio-http/shared/src/main/scala/zio/http/Header.scala
Line 4151 in 28c9de1
To Reproduce
On snapshot - 3.0.0-RC4+77-66867e7f-SNAPSHOT/
The text was updated successfully, but these errors were encountered: