My routes file looks like
GET / controllers.Application.index()
POST /get_token controllers.Application.getToken()
GET for '/' works fine. However, POST for '/get_token' fails with following error message.
[error] p.nettyException - Exception caught in Netty
java.lang.IllegalArgumentException: invalid version format: =Dᅥメ$_!HBユHᅢW(+/゙ᅩᅩ
at org.jboss.netty.handler.codec.http.HttpVersion.<init>(HttpVersion.java:102) ~[netty.jar:na]
at org.jboss.netty.handler.codec.http.HttpVersion.valueOf(HttpVersion.java:62) ~[netty.jar:na]
at org.jboss.netty.handler.codec.http.HttpRequestDecoder.createMessage(HttpRequestDecoder.java:75) ~[netty.jar:na]
at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:189) ~[netty.jar:na]
at org.jboss.netty.handler.codec.http.HttpMessageDecoder.decode(HttpMessageDecoder.java:101) ~[netty.jar:na]
at org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:500) ~[netty.jar:na]
I am using play-2.2.1.
I am relatively new to play.
Can some one help me out?
Thanks in advance!
Are you connecting via https? If so, you may not have a certificate set up.
The simplest fix would be to connect via http instead of https. If you really want https, though, you could generate a self-signed certificate:
keytool -genkey -alias MyKey -keyalg RSA -keysize 2048 -keystore keystore.jks
play -Dhttps.port=9443 -Dhttps.keyStore=keystore.jks -Dhttps.keyStorePassword=password run
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With