applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CTestServerStreamManager.cpp
branchRCL_3
changeset 3 5ee1d9ce5878
parent 0 b16258d2340f
child 19 c0c2f28ace9c
--- a/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CTestServerStreamManager.cpp	Tue Feb 02 01:09:52 2010 +0200
+++ b/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CTestServerStreamManager.cpp	Fri Feb 19 23:50:57 2010 +0200
@@ -183,6 +183,41 @@
 	{
 	TBool processingRequest = ETrue;
 	TInt currentBatch = 0;
+	_LIT(KDefectTitle, "Defect Fix CDEF143497");
+   while((iTestCase->TestCaseName().Match(KDefectTitle) == 0) && (processingRequest && (iCurrentTrans <= iTransCount)) && (currentBatch<KResponseBatchSize))
+    	{
+    	// Do we have enough data to respond to the current transaction?
+		TPtrC8 rawRequest = iTestCase->GetRawRequest(iConnectionIndex, iCurrentTrans);
+		TInt requestLength = rawRequest.Length();
+		TPtrC8 dataWindow = iDataStore->Mid(iDataPos);        
+        // Prepare the response data to send
+        iDataPos += requestLength;
+        processingRequest = ETrue;
+        TPtrC8 rawResponse = iTestCase->GetRawResponse(iConnectionIndex, iCurrentTrans);
+        if(iDataToSend==NULL)
+        iDataToSend = rawResponse.AllocL();
+        else
+        {
+        TInt responseLength = rawResponse.Length();
+        iDataToSend = iDataToSend->ReAllocL( (iDataToSend->Length()) + responseLength );
+        TPtr8 buffer = iDataToSend->Des();
+        buffer.Append(rawResponse);
+        }
+        // Check for a Connection: Close in the request
+        iCloseConnection = IsConnectionCloseInData(rawRequest, rawResponse);
+        if(iCloseConnection)
+        processingRequest = EFalse;
+        ++iCurrentTrans;
+        ++currentBatch;
+        if( processingRequest && currentBatch==KResponseBatchSize)
+            iMoreResponseBatches = ETrue;
+        else
+            iMoreResponseBatches = EFalse;
+		if(iDataToSend!=NULL)
+		return ETrue;
+
+		return EFalse;            
+		} 
 	while( (processingRequest && (iCurrentTrans < iTransCount)) && (currentBatch<KResponseBatchSize) )
 		{
 		// Do we have enough data to respond to the current transaction?