diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-A88F4A4E-49D7-4F92-8047-CA287C54B964.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-A88F4A4E-49D7-4F92-8047-CA287C54B964.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,39 @@ + + + + + +Transaction +Properties +

Transaction properties are accessed using the RHTTPTransaction::PropertySet() method, +which returns an RHTTPTransactionPropertySet handle. They +are used to store information related to a transaction that is required to +persist during the transaction lifetime. Such information is not transmitted; +the mechanism only provides an association, mainly used by Symbian developers +for filter.

+

The two pre-defined properties that can be set by the client are HTTP::EUsername and HTTP::EPassword. +Their use is described in Validation +filter.

+

An example of properties in use is taken from the Redirection filter, where +a count is maintained of the number of redirections made in response to 300-series +HTTP status codes:

+// see if this transaction has been redirected before +THTTPHdrVal redirectCountProperty; +if (aTransaction.PropertySet().Property(p.StringF(HTTP::ERedirectCount,RHTTPSession::GetTable()), +redirectCountProperty)) + { + __ASSERT_DEBUG(redirectCountProperty.Type() == THTTPHdrVal::KTIntVal, HTTPPanic::Panic(HTTPPanic::EHeaderInvalidType)); + redirectCount = redirectCountProperty.Int(); + __ASSERT_DEBUG(redirectCount > 0, HTTPPanic::Panic(HTTPPanic::EHeaderInvalidType)); + } + +// Only redirect a certain number of times, and update the redirect count property of the transaction +if (++redirectCount < KRedirectLimit) + aTransaction.PropertySet().SetPropertyL(p.StringF(HTTP::ERedirectCount,RHTTPSession::GetTable()), redirectCount); +
\ No newline at end of file