Client lib: fail read if read returns more than requested. The code assumption is that read will return no greater than requested. With no check in place, the read code path will result in assertion failure. Ensure that the read content length equals to the number of bytes in the read buffer.