diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-765A6D87-5C2C-4E79-9EA5-9F8930062ED0.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-765A6D87-5C2C-4E79-9EA5-9F8930062ED0.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,53 @@ + + + + + +Enabling +MHTTPDataOptimiser for a session +

You must use the RHTTPSession::SetupHTTPDataOptimiser() function +of the RHTTPSession class to enable the MHTTPDataOptimiser implementation +for a session. The following code illustrates the RHTTPSession class:

+class RHTTPSession +{ +public: +…… + +RHTTPSession::SetupHTTPDataOptimiser (MHTTPDataOptimiser& aHTTPOptimiser); + +MHTTPDataOptimiser* RHTTPSession::HTTPDataOptimiser (); + +}; +

For a session, if you want to prevent a transaction from using the MHTTPDataOptimiser +implementation, see the Overriding +the optimiser for a session section.

+

Note: For more information about how to enable the MHTTPDataOptimiser implementation +for a session, see the HTTP +Whole Message Filter example section.

+
Overriding +the optimiser for a session

By default, if the MHTTPDataOptimiser implementation +is enabled for a session, it applies to all transactions within the session +when the MHTTPDataOptimiser implementation is not enabled +for individual transactions. In a scenario where you want to prevent a particular +transaction (for which MHTTPDataOptimiser implementation +is not enabled) of a session from using the MHTTPDataOptimiser implementation +of the session, set the EHTTPTransOptimiser property with +the value EDisableHTTPTransOptimiser on that transaction.

The +following code illustrates how to set the EHTTPTransOptimiser property:

// HTTP session object +RHTTPSession sess; + +// The MHTTPDataOptimiser implementation is enabled for a session. +sess.SetupHttpDataOptimiser(*this); + +// HTTP transaction object +RHTTPTransaction trans = sess.OpenTransactionL(const TUriC8&, MHTTPTransactionCallback&, RStringF); +THTTPHdrVal disableOptimiser(sess.StringPool().StringF(HTTP::EDisableHTTPTransOptimiser, RHTTPSession::GetTable())); +trans.PropertySet().SetPropertyL(sess.StringPool().StringF(HTTP::EHTTPTransOptimiser, RHTTPSession::GetTable()), disableOptimiser); +
+
\ No newline at end of file