refine http read, support c style api

This commit is contained in:
winlin 2015-04-10 14:25:14 +08:00
parent 5c00ce8a96
commit 0a7cea063c

View File

@ -1267,8 +1267,9 @@ int SrsHttpMessage::body_read_all(string& body)
return ret;
}
srs_assert (nb_read > 0);
body.append(buf, nb_read);
if (nb_read > 0) {
body.append(buf, nb_read);
}
}
return ret;