fixed 2 bugs

1: it occured when it stop receiving just after the header and head separator was set to the end of received message
2: when (in chunked transfer encoding) it got the size of next chunk, and it was so long that it could not receive the content