akka-js / akka.js

Akka, for Scala.js
http://akka-js.org
475 stars 39 forks source link

Updated URLEncoder.encode encoding to be case insensitive #102

Closed mliarakos closed 4 years ago

mliarakos commented 4 years ago

The JVM implementation of the encode method in java.net.URLEncoder is case insensitive with respect to the encoding name. However, the akka.js version is not in that it only supports uppercase "UTF-8". This PR makes the UTF-8 check case insensitive to be inline with the JVM implementation.

Credit to @an-tex for identifying the issue.

andreaTP commented 4 years ago

Thanks a lot for the fix!

In akka.js unfortunately there are still a few hacks like that, please keep me posted if you go for the proper solution:

provide a proper implementation in scala.js

So that I can remove this hack from this codebase. Meanwhile I merge!