Fix content-length not equal to real buffer size (not string size)