[#1534] Fix SslHandler problems for partial data

This is the WIP to fix #1534