vincenthz/hs-tls — pull request #96 by hiratara (2014-12-29 04:24:59+00:00)
Title: Empty hostname causes invalid sequence

According to specification, `HostName` vector cannot be null (`opaque HostName<1..2^16-1>;`), but
`defaultParamsClient ""` can produce this kind of sequence in tls handshake, then remote server returns decode_error.

This patch just ignores any hostnames whose length is 0.

I also prepare unit tests on 89277a6 though it exposes `Network.TLS.Extension`. I think this change is not so good, so I divide my patch into 2 commits.