Browse Source

Fixed the issue that the HTTP client could only handle the return data less than 8KB

Fixed the issue that the HTTP client could only handle the return data less than 8KB
wincsb 1 năm trước cách đây
mục cha
commit
7278f2fc2b
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      util/src/tc_http.cpp

+ 3 - 2
util/src/tc_http.cpp

@@ -2279,6 +2279,7 @@ int TC_HttpRequest::doRequest(const string &sSendBuffer, TC_TCPClient &tcpClient
 			else
 			{
 					recvBuffer->addWriteIdx(iRecvLen);
+					rbuf->addLength(iRecvLen);
 				
 			}
 		}
@@ -2286,13 +2287,13 @@ int TC_HttpRequest::doRequest(const string &sSendBuffer, TC_TCPClient &tcpClient
 		switch (iRet)
 		{
 		case TC_ClientSocket::EM_SUCCESS:
-			if (stHttpRsp.incrementDecode(*rbuf->getBuffer()))
+			if (stHttpRsp.incrementDecode(*rbuf))
 			{
 				return TC_ClientSocket::EM_SUCCESS;
 			}
 			continue;
 		case TC_ClientSocket::EM_CLOSE:
-			stHttpRsp.incrementDecode(*rbuf->getBuffer());
+			stHttpRsp.incrementDecode(*rbuf);
 			return TC_ClientSocket::EM_SUCCESS;
 		default:
 			return iRet;