Fix problem with decoding http headers over tls connections

This fixed GitHub issue 96.