title: Play framework 2.2.1 HTTPs fails on connection attempt
body: <p>I am trying to run play framework 2.2.1 application on HTTPs in dev mode. I use the following command:</p>
  
  <pre><code>Development/Play/ssltest$ JAVA_OPTS=-Dhttps.port=9443 play run
  </code></pre>
  
  <p>I got the following, which seems to be OK </p>
  
  <pre><code>--- (Running the application from SBT, auto-reloading is enabled) ---
  
  [info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
  [info] play - Listening for HTTPS on port /0:0:0:0:0:0:0:0:9443
  
  (Server started, use Ctrl+D to stop and go back to the console...)    
  </code></pre>
  
  <p>However, when I try to connect to the app over HTTPS: </p>
  
  <pre><code>"https://localhost:9443"
  </code></pre>
  
  <p>The app crash and I go the following stack of exceptions:</p>
  
  <pre><code>[error] play - Error loading fake key store
  java.security.cert.CertificateException: Subject class type invalid.
  at sun.security.x509.X509CertInfo.setSubject(X509CertInfo.java:888) ~[na:1.8.0-ea]
  at sun.security.x509.X509CertInfo.set(X509CertInfo.java:415) ~[na:1.8.0-ea]
  at play.core.server.netty.FakeKeyStore$.createSelfSignedCertificate(FakeKeyStore.scala:71) ~[play_2.10.jar:2.2.1]
  at play.core.server.netty.FakeKeyStore$.keyManagerFactory(FakeKeyStore.scala:34) ~[play_2.10.jar:2.2.1]
  at play.core.server.NettyServer$PlayPipelineFactory$$anonfun$sslContext$2.apply(NettyServer.scala:98) [play_2.10.jar:2.2.1]
  at play.core.server.NettyServer$PlayPipelineFactory$$anonfun$sslContext$2.apply(NettyServer.scala:94) [play_2.10.jar:2.2.1]
  
  [info] play - Application started (Dev)
  [error] p.nettyException - Exception caught in Netty
  java.lang.IllegalArgumentException: invalid version format: ﾎﾫ?BYFￅﾛ￵￣X￶￧ﾣﾇ$￀+￀/ﾞﾜ￀
  at org.jboss.netty.handler.codec.http.HttpVersion.&lt;init&gt;(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]
  
  [error] p.nettyException - Exception caught in Netty
  java.lang.IllegalArgumentException: empty text
  at org.jboss.netty.handler.codec.http.HttpVersion.&lt;init&gt;(HttpVersion.java:97) ~[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]
  
   [error] p.nettyException - Exception caught in Netty
   java.lang.IllegalArgumentException: invalid version format: ﾎﾫ?BYFￅﾛ￵￣X￶￧ﾣﾇ$￀+￀/ﾞﾜ￀
  at org.jboss.netty.handler.codec.http.HttpVersion.&lt;init&gt;(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]
  
   [error] p.nettyException - Exception caught in Netty
   java.lang.IllegalArgumentException: empty text
  at org.jboss.netty.handler.codec.http.HttpVersion.&lt;init&gt;(HttpVersion.java:97) ~[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]
  
   [error] p.nettyException - Exception caught in Netty
   java.lang.IllegalArgumentException: empty text
  at org.jboss.netty.handler.codec.http.HttpVersion.&lt;init&gt;(HttpVersion.java:97) ~[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]
  
  [error] p.nettyException - Exception caught in Netty
  java.lang.IllegalArgumentException: empty text
  at org.jboss.netty.handler.codec.http.HttpVersion.&lt;init&gt;(HttpVersion.java:97) ~[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]
  
  [error] p.nettyException - Exception caught in Netty
  java.lang.IllegalArgumentException: invalid version format: ￀
  at org.jboss.netty.handler.codec.http.HttpVersion.&lt;init&gt;(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]
  
  [error] p.nettyException - Exception caught in Netty
  java.lang.IllegalArgumentException: empty text
  at org.jboss.netty.handler.codec.http.HttpVersion.&lt;init&gt;(HttpVersion.java:97) ~[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]
  
  [error] p.nettyException - Exception caught in Netty
  java.lang.IllegalArgumentException: invalid version format: ￀
  at org.jboss.netty.handler.codec.http.HttpVersion.&lt;init&gt;(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]
  
  [error] p.nettyException - Exception caught in Netty
  java.lang.IllegalArgumentException: empty text
  at org.jboss.netty.handler.codec.http.HttpVersion.&lt;init&gt;(HttpVersion.java:97) ~[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]
  
  [error] p.nettyException - Exception caught in Netty
  java.lang.IllegalArgumentException: empty text
  at org.jboss.netty.handler.codec.http.HttpVersion.&lt;init&gt;(HttpVersion.java:97) ~[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]
  
  [error] p.nettyException - Exception caught in Netty
  java.lang.IllegalArgumentException: empty text
  at org.jboss.netty.handler.codec.http.HttpVersion.&lt;init&gt;(HttpVersion.java:97) ~[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]    
  </code></pre>