From 0a7cea063c0b9b460587e3ad55508a10f38a948d Mon Sep 17 00:00:00 2001 From: winlin Date: Fri, 10 Apr 2015 14:25:14 +0800 Subject: [PATCH] refine http read, support c style api --- trunk/src/app/srs_app_http.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trunk/src/app/srs_app_http.cpp b/trunk/src/app/srs_app_http.cpp index 2be383c0d..fa4fe6168 100644 --- a/trunk/src/app/srs_app_http.cpp +++ b/trunk/src/app/srs_app_http.cpp @@ -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;