title: javax.net.ssl, https clients and close_notify
body: <p>Simple Netty implementation of https server utilizing javax.net.ssl, with a self-signed certificate. Server is up, and then a request is made using <a href="https://chrome.google.com/webstore/detail/dev-http-client/aejoelaoggembcahagimdiliamlcdmfm?hl=en" rel="nofollow">DHC by Restlet</a>. On the server side I get:</p>
  
  <blockquote>
    <p>io.netty.handler.ssl.SslHandler setHandshakeFailure
    <strong>WARNING: SSLEngine.closeInbound() raised an exception due to closed connection.
    javax.net.ssl.SSLException: Inbound closed before receiving peer's close_notify: possible truncation attack?</strong>
        at sun.security.ssl.Alerts.getSSLException(Unknown Source)
        at sun.security.ssl.SSLEngineImpl.fatal(Unknown Source)
        at sun.security.ssl.SSLEngineImpl.fatal(Unknown Source)
        at sun.security.ssl.SSLEngineImpl.closeInbound(Unknown Source)
        at io.netty.handler.ssl.SslHandler.setHandshakeFailure(SslHandler.java:905)
        at io.netty.handler.ssl.SslHandler.channelInactive(SslHandler.java:576)
        at io.netty.channel.DefaultChannelHandlerContext.invokeChannelInactive(DefaultChannelHandlerContext.java:819)
        at io.netty.channel.DefaultChannelHandlerContext.access$1300(DefaultChannelHandlerContext.java:38)
        at io.netty.channel.DefaultChannelHandlerContext$5.run(DefaultChannelHandlerContext.java:808)
        at io.netty.channel.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:259)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:305)
        at io.netty.channel.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:110)
        at java.lang.Thread.run(Unknown Source)</p>
  </blockquote>
  
  <p>And on the client side:</p>
  
  <blockquote>
    <p>No response. Is the certificate valid? Click here to check.</p>
  </blockquote>
  
  <p>Issuing the same request at Chrome's address bar, the same server-side exception. Issuing the same at Firefox's address bar, the same exception while Firefox is displaying its warning page about the certificate not being from a trusted CA. <em>This exception seems very generic and not directly indicating what the state of the protocol is</em>. Does it mean these 3 clients (Chrome, Firefox, <a href="https://chrome.google.com/webstore/detail/dev-http-client/aejoelaoggembcahagimdiliamlcdmfm?hl=en" rel="nofollow">DHC by Restlet</a>), are not playing the protocol nicely and just disappearing on the server rather than sending a close_notify? or is that a client-side behavior mandated by SSL RFC's or just a security oriented client-side design?</p>