diff -r 4816d766a08a -r f345bda72bc4 Symbian3/PDK/Source/GUID-A88F4A4E-49D7-4F92-8047-CA287C54B964.dita --- a/Symbian3/PDK/Source/GUID-A88F4A4E-49D7-4F92-8047-CA287C54B964.dita Tue Mar 30 11:42:04 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-A88F4A4E-49D7-4F92-8047-CA287C54B964.dita Tue Mar 30 11:56:28 2010 +0100 @@ -1,39 +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); + + + + + +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