diff --git a/trunk/ide/srs_xcode/srs_xcode.xcodeproj/project.xcworkspace/xcuserdata/winlin.xcuserdatad/UserInterfaceState.xcuserstate b/trunk/ide/srs_xcode/srs_xcode.xcodeproj/project.xcworkspace/xcuserdata/winlin.xcuserdatad/UserInterfaceState.xcuserstate index 2df424da4..a2bac2138 100644 Binary files a/trunk/ide/srs_xcode/srs_xcode.xcodeproj/project.xcworkspace/xcuserdata/winlin.xcuserdatad/UserInterfaceState.xcuserstate and b/trunk/ide/srs_xcode/srs_xcode.xcodeproj/project.xcworkspace/xcuserdata/winlin.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/trunk/src/app/srs_app_http.cpp b/trunk/src/app/srs_app_http.cpp index a16f33efb..ae4e09bd5 100644 --- a/trunk/src/app/srs_app_http.cpp +++ b/trunk/src/app/srs_app_http.cpp @@ -1315,17 +1315,6 @@ int SrsHttpParser::parse_message_imp(SrsStSocket* skt) srs_info("buffer=%d, nparsed=%d, body=%d", buffer->size(), (int)nparsed, body_parsed); } - // when nothing parsed, read more to parse. - if (nparsed == 0) { - // when requires more, only grow 1bytes, but the buffer will cache more. - if ((ret = buffer->grow(skt, buffer->size() + 1)) != ERROR_SUCCESS) { - if (!srs_is_client_gracefully_close(ret)) { - srs_error("read body from server failed. ret=%d", ret); - } - return ret; - } - } - // consume the parsed bytes. if (nparsed && nparsed - body_parsed > 0) { buffer->read_slice(nparsed - body_parsed); @@ -1336,6 +1325,17 @@ int SrsHttpParser::parse_message_imp(SrsStSocket* skt) if (state == SrsHttpParseStateHeaderComplete || state == SrsHttpParseStateMessageComplete) { break; } + + // when nothing parsed, read more to parse. + if (nparsed == 0) { + // when requires more, only grow 1bytes, but the buffer will cache more. + if ((ret = buffer->grow(skt, buffer->size() + 1)) != ERROR_SUCCESS) { + if (!srs_is_client_gracefully_close(ret)) { + srs_error("read body from server failed. ret=%d", ret); + } + return ret; + } + } } // parse last header.