diff -r 2f328ce1b263 -r ea9c9681bbaf applayerprotocols/httpservice/test/httpservicetest/ctestserverstreammanager.cpp --- a/applayerprotocols/httpservice/test/httpservicetest/ctestserverstreammanager.cpp Thu May 27 13:21:53 2010 +0300 +++ b/applayerprotocols/httpservice/test/httpservicetest/ctestserverstreammanager.cpp Fri Jun 11 14:06:05 2010 +0300 @@ -18,10 +18,8 @@ #include #include "httptestutils.h" #include "chttpclienttestparams.h" +#include -const TUint KCarriageReturn = '\r'; -const TUint KLineFeed = '\n'; -const TUint KSpace = ' '; CLocalTestServerStreamManager* CLocalTestServerStreamManager::NewL(CHTTPTestUtils& aTestUtils, MInputStream* aInStream, MOutputStream* aOutStream, CHttpClientTestParamArray& aTestParamArray) { @@ -68,19 +66,27 @@ } else { - // Check to see if the buffer needs to grow - TInt maxLength = iRequestStream->Des().MaxLength(); - TInt reqdLength = iRequestStream->Length() + aBuffer.Length(); - if (reqdLength > maxLength) + if(aBuffer.CompareF(iCurrentTestParam->EncodedAuthenticationRequest()) != 0) { - HBufC8* largerBuffer = iRequestStream->ReAllocL(maxLength + aBuffer.Length()); - - // Switch buffers. The old one was removed by ReAlloc. - iRequestStream = largerBuffer; + // Check to see if the buffer needs to grow + TInt maxLength = iRequestStream->Des().MaxLength(); + TInt reqdLength = iRequestStream->Length() + aBuffer.Length(); + if (reqdLength > maxLength) + { + HBufC8* largerBuffer = iRequestStream->ReAllocL(maxLength + aBuffer.Length()); + + // Switch buffers. The old one was removed by ReAlloc. + iRequestStream = largerBuffer; + } + + // Can now append confidently + iRequestStream->Des().Append(aBuffer); + } + else + { + iRequestStream = aBuffer.AllocL(); + iCurrentTestParam->SetAuthReqRes(); } - - // Can now append confidently - iRequestStream->Des().Append(aBuffer); } iInputStream->ReceivedDataRes(); ProcessRequestStreamL();