applayerpluginsandutils/httpprotocolplugins/httpclient/chttpresponseparser.cpp
branchRCL_3
changeset 19 c0c2f28ace9c
parent 18 5f1cd966e0d9
child 20 a0da872af3fa
--- a/applayerpluginsandutils/httpprotocolplugins/httpclient/chttpresponseparser.cpp	Thu Aug 19 10:27:19 2010 +0300
+++ b/applayerpluginsandutils/httpprotocolplugins/httpclient/chttpresponseparser.cpp	Tue Aug 31 15:44:10 2010 +0300
@@ -27,7 +27,6 @@
 #include "mhttpresponseobserver.h"
 #include "thttpclientpanic.h"
 #include "chttpconnectioninfo.h"
-#include <e32math.h>
 
 _LIT8(KHeaderSeparator,	"\n");
 
@@ -296,15 +295,9 @@
 			
 			}
 		else
-	        {		    
-            // Check client has asked to return Default Error occured while Disconnect received
-            if (clientTrans->PropogateDefaultError())
-               {
-               NotifyObserverError(aError);             
-               return;
-               }
-            // Need to map to appropriate error code if the disconnect notification is
-            // asked by the client			
+	        {
+			// Need to map to appropriate error code if the disconnect notification is
+			// asked by the client
 			if ( clientTrans->NeedDisconnectNotification() )
 				{
 				CHttpRequestComposer& request = static_cast<CHttpRequestComposer&>(iProtTrans->TxData());
@@ -505,40 +498,6 @@
                  }
 		}
 		
- 		if (name.DesC().CompareF(stringPool.StringF(HTTP::EWWWAuthenticate,RHTTPSession::GetTable()).DesC()) == KErrNone)
-            {
-            _LIT8(KNtlmProtocolName,"NTLM");
-            if (aFieldValue.FindF(KNtlmProtocolName)!= KErrNotFound)
-                {
-                CHttpClientTransaction& protTran = static_cast<CHttpClientTransaction&>(*iProtTrans);
-                CHttpConnectionManager* manager = protTran.ConnectionManager();
-                _LIT8( KNtlmConnId, "NTLMConnId" );
-                if (aFieldValue.Length() >=  4 )
-                    {
-                    if (manager->GetNtlmConnId() == KErrNotFound)
-                        {
-                        TInt ntmlConnId= Math::Random()%5789; //some magic number to get random connection  id
-                        manager->SetNtlmConnId(ntmlConnId);
-                        RStringF ntlmId= stringPool.OpenFStringL( KNtlmConnId );
-                        CleanupClosePushL(ntlmId);
-                        THTTPHdrVal value;
-                        value.SetInt( ntmlConnId );
-                        trans.PropertySet().SetPropertyL( ntlmId, value );
-                        CleanupStack::PopAndDestroy(&ntlmId);
-                        }
-                    else
-                        {
-                        RStringF ntlmId= stringPool.OpenFStringL( KNtlmConnId );
-                        CleanupClosePushL(ntlmId);
-                        THTTPHdrVal value;
-                        value.SetInt(manager->GetNtlmConnId());
-                        trans.PropertySet().SetPropertyL( ntlmId, value );    
-                        CleanupStack::PopAndDestroy(&ntlmId);
-                        }
-                    }
-               }
-            }
- 		
 		CleanupStack::PopAndDestroy(&name);
 		
 		if( BodyComplete() && !GotTrailers() )	
@@ -700,6 +659,7 @@
 	if( !ConsumingResponse() )
 		{
 		iResponseObserver.ResponseComplete(aExcessData);
+
 		if ( iCancellingResponse )
 			{
 			return;
@@ -808,11 +768,9 @@
 TBool CHttpResponseParser::NeedCompletion ()
 	{
 	RHTTPTransaction trans = iProtTrans->Transaction ();
-	TInt statusCode = trans.Response().StatusCode();
-	if ( HTTPStatus::IsRedirection ( statusCode )|| statusCode == HTTPStatus::EUnauthorized )
+	if ( HTTPStatus::IsRedirection ( trans.Response().StatusCode() ) )
 		{
 		// If it is a redirection message then we need to complete the response
-		// for 401 error..we have to continue on the same port..so we need to complete the response immediately
 		return ETrue;			
 		}
 	return EFalse;