Forráskód Böngészése

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 éve
szülő
commit
7278f2fc2b
1 módosított fájl, 3 hozzáadás és 2 törlés
  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;