# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1278417104 -10800 # Node ID dd1f62411ef88df74a5b28d8e1dd10d465c1adf5 # Parent 974c3ee9bf20cae69f741345c61354850b1c6820 Revision: 201025 Kit: 2010127 diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerpluginsandutils/bookmarksupport/test/Integration/TestBookmarksSuite/bld.inf --- a/applayerpluginsandutils/bookmarksupport/test/Integration/TestBookmarksSuite/bld.inf Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerpluginsandutils/bookmarksupport/test/Integration/TestBookmarksSuite/bld.inf Tue Jul 06 14:51:44 2010 +0300 @@ -21,28 +21,28 @@ PRJ_TESTEXPORTS // Main Script file -TestBookmarksSuite.script C:\TestData\Scripts\TestBookmarksSuite.script +TestBookmarksSuite.script c:/testdata/scripts/testbookmarkssuite.script // Main ini file -TestBookmarksSuite.ini C:\TestData\Ini\TestBookmarksSuite.ini +TestBookmarksSuite.ini c:/testdata/ini/testbookmarkssuite.ini // Main Bat file to help running the tests -TestBookmarksSuite.bat \epoc32\tools\TestBookmarksSuite.bat +TestBookmarksSuite.bat /epoc32/tools/testbookmarkssuite.bat // Security tests scripts -TestBookmarksSuite_Security.script C:\TestData\Scripts\TestBookmarksSuite_Security.script -Preliminary.script C:\TestData\Scripts\Preliminary.script -Cleanup.script C:\TestData\Scripts\Cleanup.script -Cap_00000000_TestBookmarks.script C:\TestData\Scripts\Cap_00000000_TestBookmarks.script -Cap_00000010_TestBookmarks.script C:\TestData\Scripts\Cap_00000010_TestBookmarks.script -Cap_00000020_TestBookmarks.script C:\TestData\Scripts\Cap_00000020_TestBookmarks.script -Cap_00008000_TestBookmarks.script C:\TestData\Scripts\Cap_00008000_TestBookmarks.script -Cap_00010000_TestBookmarks.script C:\TestData\Scripts\Cap_00010000_TestBookmarks.script -Cap_00018000_TestBookmarks.script C:\TestData\Scripts\Cap_00018000_TestBookmarks.script +TestBookmarksSuite_Security.script c:/testdata/scripts/testbookmarkssuite_security.script +Preliminary.script c:/testdata/scripts/preliminary.script +Cleanup.script c:/testdata/scripts/cleanup.script +Cap_00000000_TestBookmarks.script c:/testdata/scripts/cap_00000000_testbookmarks.script +Cap_00000010_TestBookmarks.script c:/testdata/scripts/cap_00000010_testbookmarks.script +Cap_00000020_TestBookmarks.script c:/testdata/scripts/cap_00000020_testbookmarks.script +Cap_00008000_TestBookmarks.script c:/testdata/scripts/cap_00008000_testbookmarks.script +Cap_00010000_TestBookmarks.script c:/testdata/scripts/cap_00010000_testbookmarks.script +Cap_00018000_TestBookmarks.script c:/testdata/scripts/cap_00018000_testbookmarks.script // Security tests ini -TestBookmarksSuite_Security.ini C:\TestData\Ini\TestBookmarksSuite_Security.ini +TestBookmarksSuite_Security.ini c:/testdata/ini/testbookmarkssuite_security.ini // Security tests bat file -TestBookmarksSuite_Security.bat \epoc32\tools\TestBookmarksSuite_Security.bat +TestBookmarksSuite_Security.bat /epoc32/tools/testbookmarkssuite_security.bat // IBY file for H/W -TestBookmarksSuite.IBY \epoc32\rom\include\TestBookmarksSuite.IBY +TestBookmarksSuite.IBY /epoc32/rom/include/testbookmarkssuite.iby diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerpluginsandutils/httpprotocolplugins/httpclient/chttprequestbatcher.cpp --- a/applayerpluginsandutils/httpprotocolplugins/httpclient/chttprequestbatcher.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerpluginsandutils/httpprotocolplugins/httpclient/chttprequestbatcher.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -316,9 +316,12 @@ return iObserver->SendTimeOutVal(); } -void CHttpRequestBatcher::SetTCPCorking(TBool /* aValue */) +void CHttpRequestBatcher::SetTCPCorking(TBool aValue ) { - + if (iOutputStream) + { + iOutputStream->SetTCPCorking(aValue); + } } diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerpluginsandutils/httptransportplugins/httptransporthandler/csocket.cpp --- a/applayerpluginsandutils/httptransportplugins/httptransporthandler/csocket.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerpluginsandutils/httptransportplugins/httptransporthandler/csocket.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -43,6 +43,21 @@ return self; } +CSocket* CSocket::New(MCommsInfoProvider& aCommsInfoProvider, TSocketType aSocketType) + { + CSocket* self = new CSocket(aCommsInfoProvider); + if(self) + { + TInt error = self->Construct(aSocketType); + if(error != KErrNone) + { + delete self; + self = NULL; + } + } + return self; + } + CSocket::~CSocket() /** Destructor. @@ -70,54 +85,62 @@ @param aSocketType The type of the socket. */ { - switch( aSocketType ) - { - case EProtocolSocket: - { - if ( iCommsInfoProvider.HasConnection() ) - { - // Open a protocol socket with a RConnection - User::LeaveIfError(iSocket.Open( - iCommsInfoProvider.SocketServer(), - iCommsInfoProvider.ProtocolDescription().iAddrFamily, - iCommsInfoProvider.ProtocolDescription().iSockType, - iCommsInfoProvider.ProtocolDescription().iProtocol, - iCommsInfoProvider.Connection() - )); - } - else - { - // Open a protocol socket without a RConnection, we don't need one ( Loopback address ) - User::LeaveIfError(iSocket.Open( - iCommsInfoProvider.SocketServer(), - iCommsInfoProvider.ProtocolDescription().iAddrFamily, - iCommsInfoProvider.ProtocolDescription().iSockType, - iCommsInfoProvider.ProtocolDescription().iProtocol - )); - } - } break; - case EBlankSocket: - { - // Open a blank socket - User::LeaveIfError(iSocket.Open(iCommsInfoProvider.SocketServer())); - } break; - default: - User::Invariant(); - } - TInt id = iCommsInfoProvider.SessionId(); - if(id>=0) - { - // set socket option - iSocket.SetOpt(KSOHttpSessionId, KSOLHttpSessionInfo, id); - iSocket.SetOpt(KSoTcpKeepAlive, KSolInetTcp, KTcpTriggeredKeepAlive); - } - if(aSocketType != EBlankSocket) - { - iSocket.SetOpt(KSoTcpNoDelay,KSolInetTcp,1); // Disable the nagle. - iSocket.SetOpt(KSORecvBuf, KSOLSocket, KSocketRecvBufSize); // Set the socket recv buf to be 16K - } + User::LeaveIfError(Construct(aSocketType)); } +TInt CSocket::Construct(TSocketType aSocketType) + { + TInt error = KErrNone; + switch( aSocketType ) + { + case EProtocolSocket: + { + if ( iCommsInfoProvider.HasConnection() ) + { + // Open a protocol socket with a RConnection + error = iSocket.Open(iCommsInfoProvider.SocketServer(), + iCommsInfoProvider.ProtocolDescription().iAddrFamily, + iCommsInfoProvider.ProtocolDescription().iSockType, + iCommsInfoProvider.ProtocolDescription().iProtocol, + iCommsInfoProvider.Connection() + ); + } + else + { + // Open a protocol socket without a RConnection, we don't need one ( Loopback address ) + error = iSocket.Open(iCommsInfoProvider.SocketServer(), + iCommsInfoProvider.ProtocolDescription().iAddrFamily, + iCommsInfoProvider.ProtocolDescription().iSockType, + iCommsInfoProvider.ProtocolDescription().iProtocol + ); + } + } break; + case EBlankSocket: + { + // Open a blank socket + error = iSocket.Open(iCommsInfoProvider.SocketServer()); + } break; + default: + User::Invariant(); + } + if(error == KErrNone) + { + TInt id = iCommsInfoProvider.SessionId(); + if(id>=0) + { + // set socket option + iSocket.SetOpt(KSOHttpSessionId, KSOLHttpSessionInfo, id); + iSocket.SetOpt(KSoTcpKeepAlive, KSolInetTcp, KTcpTriggeredKeepAlive); + } + if(aSocketType != EBlankSocket) + { + iSocket.SetOpt(KSoTcpNoDelay,KSolInetTcp,1); // Disable the nagle. + iSocket.SetOpt(KSORecvBuf, KSOLSocket, KSocketRecvBufSize); // Set the socket recv buf to be 16K + } + } + return error; + } + TInt CSocket::Listen(TUint aQSize, TUint16 aPort) /** Start the listen service. The socket is bound to the local port specified by diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerpluginsandutils/httptransportplugins/httptransporthandler/csocket.h --- a/applayerpluginsandutils/httptransportplugins/httptransporthandler/csocket.h Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerpluginsandutils/httptransportplugins/httptransporthandler/csocket.h Tue Jul 06 14:51:44 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -51,7 +51,9 @@ public: // methods static CSocket* NewL(MCommsInfoProvider& aCommsInfoProvider, TSocketType aSocketType); - + + static CSocket* New(MCommsInfoProvider& aCommsInfoProvider, TSocketType aSocketType); + virtual ~CSocket(); TInt Listen(TUint aQSize, TUint16 aPort); @@ -97,7 +99,8 @@ CSocket(MCommsInfoProvider& aCommsInfoProvider); void ConstructL(TSocketType aSocketType); - + + TInt Construct(TSocketType aSocketType); private: /** The comms info provider diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerpluginsandutils/httptransportplugins/httptransporthandler/csocketconnector.cpp --- a/applayerpluginsandutils/httptransportplugins/httptransporthandler/csocketconnector.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerpluginsandutils/httptransportplugins/httptransporthandler/csocketconnector.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -55,7 +55,6 @@ // Cleanup... delete iHost; delete iConnectingSocket; - iHostResolver.Close(); // __FLOG_CLOSE; } @@ -104,20 +103,33 @@ iHost = HBufC::NewL(aRemoteHost.Length()); iHost->Des().Copy(aRemoteHost); iPort = aRemotePort; - + + TInt error = KErrNone; // Move to the PendingDNSLookup state and self complete. if(aRemoteAddress == NULL) { + RDebug::Printf("RemoteAddress is NULL so doing a DNS lookup"); + iState = EPendingDNSLookup; // Address is unknown / DNS lookup is needed - iState = EPendingDNSLookup; + error = DoPendingDNSLookup(); } else { + RDebug::Printf("Remote address is known so doing a direct connect"); + iState = EConnecting; // Address is know. No lookup is needed. Just go and connect. iHostDnsEntry().iAddr = *aRemoteAddress; - iState = EConnecting; + error = DoConnect(); } - CompleteSelf(); + + if(error != KErrNone) + { + iState = EPendingDNSLookup; + // Error the AO and handle the error in the normal path. + TRequestStatus* pStat = &iStatus; + User::RequestComplete(pStat, error); + SetActive(); + } } void CSocketConnector::CompleteSelf() @@ -193,80 +205,11 @@ { case EPendingDNSLookup: { -#if defined (_DEBUG) && defined (_LOGGING) - TBuf8 host; - host.Copy((*iHost).Left(KHostNameSize)); //just get the KHostNameSize characters - - __FLOG_1(_T8("Doing DNS lookup -> searching for host %S"), &host); -#endif - - __OOM_LEAVE_TEST - - if ( iCommsInfoProvider.HasConnection() ) - { - // Open the host resolver session with the preffered connection - User::LeaveIfError(iHostResolver.Open( - iCommsInfoProvider.SocketServer(), - iCommsInfoProvider.ProtocolDescription().iAddrFamily, - KProtocolInetUdp, - iCommsInfoProvider.Connection() - )); - } - else - { - // Open the host resolver session with no connection - User::LeaveIfError(iHostResolver.Open( - iCommsInfoProvider.SocketServer(), - iCommsInfoProvider.ProtocolDescription().iAddrFamily, - KProtocolInetUdp - )); - } - - // Start the DNS lookup for the remote host name. - iHostResolver.GetByName(*iHost, iHostDnsEntry, iStatus); - - // Move to the Connecting state and go active - iState = EConnecting; - SetActive(); + User::LeaveIfError(DoPendingDNSLookup()); } break; case EConnecting: { - __OOM_LEAVE_TEST - - // DNS lookup successful - form the internet address object - iAddress = TInetAddr(iHostDnsEntry().iAddr); - iAddress.SetPort(iPort); - -#if defined (_DEBUG) && defined (_LOGGING) - TBuf8 host; - host.Copy((*iHost).Left(KHostNameSize)); //just get the KHostNameSize characters - - TBuf ip16bit; - iAddress.Output(ip16bit); - - TBuf8 ip; - ip.Copy(ip16bit); - - __FLOG_2(_T8("DNS lookup complete -> host %S has IP address %S"), &host, &ip); -#endif - - // Start a default RConnection, if one is not started and not local loopback address - if ( !iCommsInfoProvider.HasConnection() && !iAddress.IsLoopback() ) - { - iCommsInfoProvider.StartDefaultCommsConnectionL (); - } - - // Create the connecting socket - iConnectingSocket = CSocket::NewL(iCommsInfoProvider, CSocket::EProtocolSocket); - - // Start connecting to the remote client - iConnectingSocket->Connect(iAddress, iStatus); - - __FLOG_2(_T8("Connecting -> to host %S on IP address %S"), &host, &ip); - - // Move to the Connected state and go active - iState = EConnected; - SetActive(); + User::LeaveIfError(DoConnect()); } break; case EConnected: { @@ -334,6 +277,7 @@ { // DNS lookup is pending - cancel iHostResolver.Cancel(); + iCommsInfoProvider.AddToHostResolverCache(iHostResolver); // Add to the cache. } break; case EConnected: { @@ -431,3 +375,103 @@ return error; } + +TInt CSocketConnector::DoPendingDNSLookup() + { +#if defined (_DEBUG) && defined (_LOGGING) + TBuf8 host; + host.Copy((*iHost).Left(KHostNameSize)); //just get the KHostNameSize characters + + __FLOG_1(_T8("Doing DNS lookup -> searching for host %S"), &host); +#endif + TInt error = KErrNone; + + iCommsInfoProvider.HostResolverFromCache(iHostResolver); // Get the RHostResolver from the cache + if(iHostResolver.SubSessionHandle() <= 0) + { + RDebug::Printf("No host resolver. Open a new one..."); + if ( iCommsInfoProvider.HasConnection() ) + { + // Open the host resolver session with the preffered connection + error = iHostResolver.Open(iCommsInfoProvider.SocketServer(), + iCommsInfoProvider.ProtocolDescription().iAddrFamily, + KProtocolInetUdp, + iCommsInfoProvider.Connection()); + } + else + { + // Open the host resolver session with no connection + error = iHostResolver.Open(iCommsInfoProvider.SocketServer(), + iCommsInfoProvider.ProtocolDescription().iAddrFamily, + KProtocolInetUdp); + } + } + + if(error != KErrNone) + { + return error; + } + + // Start the DNS lookup for the remote host name. + iHostResolver.GetByName(*iHost, iHostDnsEntry, iStatus); + + // Move to the Connecting state and go active + iState = EConnecting; + SetActive(); + return error; + } + +TInt CSocketConnector::DoConnect() + { + // DNS lookup successful - form the internet address object + iAddress = TInetAddr(iHostDnsEntry().iAddr); + iAddress.SetPort(iPort); + + // Add the RHostResolver to the cache. + if(iHostResolver.SubSessionHandle() > 0) + { + iCommsInfoProvider.AddToHostResolverCache(iHostResolver); + } + +#if defined (_DEBUG) && defined (_LOGGING) + TBuf8 host; + host.Copy((*iHost).Left(KHostNameSize)); //just get the KHostNameSize characters + + TBuf ip16bit; + iAddress.Output(ip16bit); + + TBuf8 ip; + ip.Copy(ip16bit); + + __FLOG_2(_T8("DNS lookup complete -> host %S has IP address %S"), &host, &ip); +#endif + + // Start a default RConnection, if one is not started and not local loopback address + if ( !iCommsInfoProvider.HasConnection() && !iAddress.IsLoopback() ) + { + // it is ok to TRAP here as the method will be called only once. + TRAPD(error, iCommsInfoProvider.StartDefaultCommsConnectionL ()); + if(error != KErrNone) + { + return error; + } + } + + // Create the connecting socket + iConnectingSocket = CSocket::New(iCommsInfoProvider, CSocket::EProtocolSocket); + if(!iConnectingSocket) + { + return KErrNoMemory; + } + + // Start connecting to the remote client + iConnectingSocket->Connect(iAddress, iStatus); + SetActive(); + __FLOG_2(_T8("Connecting -> to host %S on IP address %S"), &host, &ip); + + // Move to the Connected state and go active + iState = EConnected; + return KErrNone; + } + + diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerpluginsandutils/httptransportplugins/httptransporthandler/csocketconnector.h --- a/applayerpluginsandutils/httptransportplugins/httptransporthandler/csocketconnector.h Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerpluginsandutils/httptransportplugins/httptransporthandler/csocketconnector.h Tue Jul 06 14:51:44 2010 +0300 @@ -101,7 +101,9 @@ void CompleteSelf(); void Suicide(); - + + TInt DoPendingDNSLookup(); + TInt DoConnect(); private: // enums /** diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerpluginsandutils/httptransportplugins/httptransporthandler/ctcptransportlayer.cpp --- a/applayerpluginsandutils/httptransportplugins/httptransporthandler/ctcptransportlayer.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerpluginsandutils/httptransportplugins/httptransporthandler/ctcptransportlayer.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2001-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -25,6 +25,9 @@ _LIT(KTcpProtName, "tcp"); +const TInt KMaxHostResolverCacheCount = 8; // 8 Should be sufficient here as we can have maximum of 8 connections + // at anytime to the host. And it is not neccassarly mean that 8 host resolvers + // will be operating simulataneously. CTcpTransportLayer* CTcpTransportLayer::NewL(TAny* aTransportConstructionParams) /** The factory constructor. @@ -54,7 +57,12 @@ // Delete the socket controllers iControllerStore.ResetAndDestroy(); - + + + // Empty and close the host resolver cache. + EmptyHostResolverCache(); + iHostResolverCache.Close(); + // Close the socket server session if owned if( iOwnsConnection ) { @@ -73,7 +81,7 @@ } CTcpTransportLayer::CTcpTransportLayer(MConnectionPrefsProvider& aTransLayerObserver) -: CHttpTransportLayer(), iConnectionPrefsProvider(aTransLayerObserver) +: CHttpTransportLayer(), iConnectionPrefsProvider(aTransLayerObserver), iHostResolverCache(KMaxHostResolverCacheCount) /** Constructor. */ @@ -191,6 +199,7 @@ // Socket and controller will be deleted by itself } iConnectorStore.ResetAndDestroy(); + EmptyHostResolverCacheIfNeeded(); } } } @@ -332,6 +341,9 @@ // Remove the socket connector from the store and compress the store. iConnectorStore.Remove(index); iConnectorStore.Compress(); + + // Empty the host resolver cache if needed + EmptyHostResolverCacheIfNeeded(); } /* @@ -355,6 +367,9 @@ // Remove the socket controller from the store and compress the store. iControllerStore.Remove(index); iControllerStore.Compress(); + + // Empty the host resolver cache if needed + EmptyHostResolverCacheIfNeeded(); } /* @@ -474,4 +489,48 @@ return ( iConnection != NULL ); } +void CTcpTransportLayer::HostResolverFromCache(RHostResolver& aResolver) + { + TInt count = iHostResolverCache.Count(); + if(count > 0) + { + RDebug::Printf("Returning the host resolver from cache..."); + // Returns the last host resolver that is added + aResolver = iHostResolverCache[count - 1]; + iHostResolverCache.Remove(count - 1); // Remove from the cache. + } + } +void CTcpTransportLayer::AddToHostResolverCache(RHostResolver& aResolver) + { + if(iHostResolverCache.Append(aResolver) != KErrNone) + { + aResolver.Close(); + } + } + +void CTcpTransportLayer::EmptyHostResolverCacheIfNeeded() + { + // Remove the host resolver if + // 1/ if the Connector store is empty and + // 2/ if the socket controller is empty + // This is important to get the mobility and one click connectivity cases working + // Otherwise the inconsistent behaviour will result as the RConnection & RSocketServ can be handled + // entirely outside of the HTTP stack, ie; from the application + if(iConnectorStore.Count() == 0 && iControllerStore.Count() == 0) + { + EmptyHostResolverCache(); + } + } + +void CTcpTransportLayer::EmptyHostResolverCache() + { + TInt count = iHostResolverCache.Count(); + while(count > 0) + { + // Close the RHostResolver and remove from the array + iHostResolverCache[count - 1].Close(); + iHostResolverCache.Remove(--count); + } + iHostResolverCache.Compress(); + } diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerpluginsandutils/httptransportplugins/httptransporthandler/ctcptransportlayer.h --- a/applayerpluginsandutils/httptransportplugins/httptransporthandler/ctcptransportlayer.h Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerpluginsandutils/httptransportplugins/httptransporthandler/ctcptransportlayer.h Tue Jul 06 14:51:44 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -103,7 +103,11 @@ virtual TBool HasConnection(); - void StartDefaultCommsConnectionL (); + virtual void StartDefaultCommsConnectionL (); + + virtual void HostResolverFromCache(RHostResolver& aResolver); + + virtual void AddToHostResolverCache(RHostResolver& aResolver); private: // methods @@ -119,6 +123,10 @@ inline MCommsInfoProvider& CommsInfoProvider(); + void EmptyHostResolverCacheIfNeeded(); + + void EmptyHostResolverCache(); + private: // attributes /** The connection preferences provider @@ -157,6 +165,8 @@ */ RPointerArray iControllerStore; + RArray iHostResolverCache; + TBool iPriority; /** Logger handle diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerpluginsandutils/httptransportplugins/httptransporthandler/mcommsinfoprovider.h --- a/applayerpluginsandutils/httptransportplugins/httptransporthandler/mcommsinfoprovider.h Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerpluginsandutils/httptransportplugins/httptransporthandler/mcommsinfoprovider.h Tue Jul 06 14:51:44 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -78,6 +78,17 @@ Starts a default RConnection */ virtual void StartDefaultCommsConnectionL () =0; + + /** + Returns the RHostResolver if available in cache. + */ + virtual void HostResolverFromCache(RHostResolver& aResolver) =0; + + /** + Add the RHostResolver to cache. If the adding fails then the RHostResolver will be + closed + */ + virtual void AddToHostResolverCache(RHostResolver& aResolver) =0; }; #endif // __MCOMMSINFOPROVIDER_H__ diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httpservice/src/chttpclienttransaction.cpp --- a/applayerprotocols/httpservice/src/chttpclienttransaction.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httpservice/src/chttpclienttransaction.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -16,8 +16,8 @@ #include "chttpclienttransaction.h" #include "chttpclienttransactionimpl.h" #include "httpclientutils.h" -#include "cheaders.h" -#include "cheaderfield.h" +#include "CHeaders.h" +#include "CHeaderField.h" #include "mhttpdatareceiver.h" #include "mhttpdatasender.h" diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httpservice/src/chttpclienttransactionimpl.cpp --- a/applayerprotocols/httpservice/src/chttpclienttransactionimpl.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httpservice/src/chttpclienttransactionimpl.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -19,7 +19,7 @@ #include "chttpservice.h" #include "chttpdatareceiver.h" #include "chttpdatasender.h" -#include "cheaders.h" +#include "CHeaders.h" CHttpClientTransactionImpl* CHttpClientTransactionImpl::NewL(CHttpService& aClient, CHttpClientTransaction& aTrans, const TDesC8& aMethod, const TDesC8& aUri) { diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httpservice/src/httpheaderiter.cpp --- a/applayerprotocols/httpservice/src/httpheaderiter.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httpservice/src/httpheaderiter.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -14,8 +14,8 @@ // #include "httpheaderiter.h" -#include "cheaders.h" -#include "cheaderfield.h" +#include "CHeaders.h" +#include "CHeaderField.h" #include "httpclientutils.h" // This class needs to be optimized. diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httpservice/test/group/httpservicetest.mmp --- a/applayerprotocols/httpservice/test/group/httpservicetest.mmp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httpservice/test/group/httpservicetest.mmp Tue Jul 06 14:51:44 2010 +0300 @@ -34,7 +34,7 @@ SOURCE chttpclienttestparams.cpp ctesthttpserviceauthentication.cpp USERINCLUDE ../../inc -USERINCLUDE ../../../httptransportfw/test/t_utils +USERINCLUDE ../../../httptransportfw/Test/t_utils USERINCLUDE ../../../httptransportfw/utils SYSTEMINCLUDE ../../../../applayerpluginsandutils/httptransportplugins/httptransporthandler diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httptransportfw/Test/Group/testhttpmessage.mmp --- a/applayerprotocols/httptransportfw/Test/Group/testhttpmessage.mmp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httptransportfw/Test/Group/testhttpmessage.mmp Tue Jul 06 14:51:44 2010 +0300 @@ -17,7 +17,7 @@ TARGETTYPE exe UID 0 0xE30FF9B5 -USERINCLUDE ../testhttpMessage ../t_utils +USERINCLUDE ../testhttpmessage ../t_utils SYSTEMINCLUDE ../../httpmessage #ifdef SYMBIAN_OLD_EXPORT_LOCATION @@ -27,7 +27,7 @@ SYSTEMINCLUDE /epoc32/include/mw/http #endif -SOURCEPATH ../testhttpMessage +SOURCEPATH ../testhttpmessage SOURCE ctestengine.cpp ctestmessagecomposer.cpp testhttpmessage.cpp ctestmessageparser.cpp LIBRARY euser.lib http.lib inetprotutil.lib bafl.lib httpmessage.lib efsrv.lib httptestutils.lib diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CRecvTimeOut.h --- a/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CRecvTimeOut.h Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CRecvTimeOut.h Tue Jul 06 14:51:44 2010 +0300 @@ -19,7 +19,7 @@ #include #include -#include "cpipeliningtestcase.h" +#include "CPipeliningTestCase.h" class CHTTPTestUtils; diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CTestCasePipelineFallback.cpp --- a/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CTestCasePipelineFallback.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CTestCasePipelineFallback.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -16,7 +16,7 @@ */ -#include "ctestcasepipelinefallback.h" +#include "CTestCasePipelineFallback.h" #include "httptestutils.h" const TInt KTransactionCount = 30; // Submit 30 transactions diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CTestCasePipelineFallback.h --- a/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CTestCasePipelineFallback.h Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CTestCasePipelineFallback.h Tue Jul 06 14:51:44 2010 +0300 @@ -22,7 +22,7 @@ #include #include -#include "cbatchingtestcase.h" +#include "CBatchingTestCase.h" class CHTTPTestUtils; diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CTestServerStreamManager.cpp --- a/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CTestServerStreamManager.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/CTestServerStreamManager.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -19,7 +19,7 @@ #include "CTestServerStreamManager.h" #include "httptestutils.h" #include "MPipeliningTestCase.h" -#include "ctestcasepipelinefallback.h" +#include "CTestCasePipelineFallback.h" const TInt KTimeOut = 50000000; const TInt KResponseBatchSize = 5; diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/cpipeliningtestengine.cpp --- a/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/cpipeliningtestengine.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/cpipeliningtestengine.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -58,7 +58,7 @@ #include "ctestcase24.h" #include "ctestcase25.h" #include "ctestcase26.h" -#include "ctestcasepipelinefallback.h" +#include "CTestCasePipelineFallback.h" #include "CDEF143497.h" _LIT(KTestHttpPipeliningTestTitle, "HTTP Pipelining Unit Test Harness"); diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/ctestcase26.cpp --- a/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/ctestcase26.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httptransportfw/Test/T_HttpPipeliningTest/ctestcase26.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -13,7 +13,7 @@ // Description: // -#include "CTestCase26.h" +#include "ctestcase26.h" #include "httptestutils.h" const TInt KTransactionCount = 14; diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httptransportfw/Test/TestScriptTest/ctestcaselocalandremotehost.h --- a/applayerprotocols/httptransportfw/Test/TestScriptTest/ctestcaselocalandremotehost.h Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httptransportfw/Test/TestScriptTest/ctestcaselocalandremotehost.h Tue Jul 06 14:51:44 2010 +0300 @@ -18,7 +18,7 @@ #include #include -#include "cpipeliningtestclient.h" +#include "CPipeliningTestClient.h" class CHTTPTestUtils; diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httptransportfw/Test/testhttpmessage/testhttpmessage.cpp --- a/applayerprotocols/httptransportfw/Test/testhttpmessage/testhttpmessage.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httptransportfw/Test/testhttpmessage/testhttpmessage.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -13,7 +13,7 @@ // Description: // -#include "TestHttpMessage.h" +#include "testhttpmessage.h" #include #include #include // Console diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httptransportfw/core/CTransaction.cpp --- a/applayerprotocols/httptransportfw/core/CTransaction.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httptransportfw/core/CTransaction.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -38,13 +38,10 @@ { // Delete all current events. iEventQueue.Reset(); - if(iStatus != ECancelled) - { - // Cancel the active object - Cancel(); - // And send the cancel event - SynchronousSendEvent(THTTPEvent::ECancel, THTTPEvent::EOutgoing, aStart); - } + // Cancel the active object + Cancel(); + // And send the cancel event + SynchronousSendEvent(THTTPEvent::ECancel, THTTPEvent::EOutgoing, aStart); if (iStatus != EInFilter && iStatus != ECancelled) iStatus = EPassive; else @@ -61,7 +58,6 @@ { CHeaderFieldPart::ClosePropertySet(iPropertySet); delete iRequest; - iRequest = NULL; delete this; return; } @@ -85,10 +81,8 @@ iSession.RemoveTransaction(this); CHeaderFieldPart::ClosePropertySet(iPropertySet); delete iRequest; - iRequest = NULL; delete iResponse; - iResponse = NULL; - + // Cancel the active object Cancel(); diff -r 974c3ee9bf20 -r dd1f62411ef8 applayerprotocols/httptransportfw/core/TFilterConfigurationIter.cpp --- a/applayerprotocols/httptransportfw/core/TFilterConfigurationIter.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/applayerprotocols/httptransportfw/core/TFilterConfigurationIter.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -76,10 +76,10 @@ } else { - ++iCurrentFilterIndex; // If the next filter is a mandatory filter then move on to the next filter if( iFilterInfoList[iCurrentFilterIndex]->iCategory == TSessionFilterInfo::EMandatory ) return Next(); + ++iCurrentFilterIndex; } return KErrNone; diff -r 974c3ee9bf20 -r dd1f62411ef8 httpfilters/cookie/data/CookieGroup.xml --- a/httpfilters/cookie/data/CookieGroup.xml Wed Jun 23 18:48:21 2010 +0300 +++ b/httpfilters/cookie/data/CookieGroup.xml Tue Jul 06 14:51:44 2010 +0300 @@ -7,6 +7,9 @@ + + + diff -r 974c3ee9bf20 -r dd1f62411ef8 httpfilters/group/bld.inf --- a/httpfilters/group/bld.inf Wed Jun 23 18:48:21 2010 +0300 +++ b/httpfilters/group/bld.inf Tue Jul 06 14:51:44 2010 +0300 @@ -19,12 +19,12 @@ #include "../httpfiltercommon/group/bld.inf" #include "../cookie/Group/bld.inf" #include "../deflatefilter/group/bld.inf" -#include "../httpfilteracceptheader/group/bld.inf" +//#include "../httpfilteracceptheader/group/bld.inf" #include "../httpfilterauthentication/group/bld.inf" #include "../httpfilterconnhandler/group/bld.inf" #include "../httpfilteriop/group/bld.inf" #include "../httpfilterproxy/group/bld.inf" -#include "../uaproffilter/group/bld.inf" +//#include "../uaproffilter/group/bld.inf" diff -r 974c3ee9bf20 -r dd1f62411ef8 httpfilters/httpfiltercommon/src/HttpFilterCommonStringsExt.cpp --- a/httpfilters/httpfiltercommon/src/HttpFilterCommonStringsExt.cpp Wed Jun 23 18:48:21 2010 +0300 +++ b/httpfilters/httpfiltercommon/src/HttpFilterCommonStringsExt.cpp Tue Jul 06 14:51:44 2010 +0300 @@ -926,6 +926,7 @@ index = EMacedonian; break; case ELangMalay: // 70 + case ELangMalay_Apac: // 326 index = EMalay; break; case ELangMalayalam: // 71