继续操作前请注册或者登录。
winlin

refine http read, support c style api

@@ -1267,8 +1267,9 @@ int SrsHttpMessage::body_read_all(string& body) @@ -1267,8 +1267,9 @@ int SrsHttpMessage::body_read_all(string& body)
1267 return ret; 1267 return ret;
1268 } 1268 }
1269 1269
1270 - srs_assert (nb_read > 0);  
1271 - body.append(buf, nb_read); 1270 + if (nb_read > 0) {
  1271 + body.append(buf, nb_read);
  1272 + }
1272 } 1273 }
1273 1274
1274 return ret; 1275 return ret;