applayerpluginsandutils/httpprotocolplugins/httpclient/chttpclienttransaction.cpp
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:21:21 +0100
branchRCL_3
changeset 20 a0da872af3fa
parent 19 c0c2f28ace9c
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201029 Kit: 201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
// All rights reserved.
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
// This component and the accompanying materials are made available
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
// which accompanies this distribution, and is available
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
//
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
// Initial Contributors:
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
// Nokia Corporation - initial contribution.
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
//
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
// Contributors:
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
//
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
// Description:
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
//
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
#include <http.h>
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
#include "chttpclienttransaction.h"
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
#include "chttprequestcomposer.h"
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
#include "chttpresponseparser.h"
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
#include "chttpconnectionmanager.h"
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
CHttpClientTransaction* CHttpClientTransaction::NewL(RHTTPTransaction aTransaction)
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
	{
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
	CHttpClientTransaction* self = new (ELeave) CHttpClientTransaction(aTransaction);
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
	return self;	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
	}
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
CHttpClientTransaction::~CHttpClientTransaction()
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
	{
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
	}
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
CHttpClientTransaction::CHttpClientTransaction(RHTTPTransaction aTransaction)
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
: CProtTransaction(aTransaction), iStringTable(RHTTPSession::GetTable())
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
	{
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
	}
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    37
void CHttpClientTransaction::SetConnectionManager(CHttpConnectionManager& aConnectionManager)
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
	{
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    39
	__ASSERT_DEBUG( iConnectionManager == NULL, User::Invariant() );
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    41
	// A connection manager has been supplied - add this object to it.	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
	iConnectionManager = &aConnectionManager;
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    43
	}
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    44
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    45
CHttpConnectionManager* CHttpClientTransaction::ConnectionManager() const
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    46
	{
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    47
	return iConnectionManager;
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    48
	}
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    49
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    50
void CHttpClientTransaction::RemoveConnectionManager()
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    51
	{
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    52
	iConnectionManager = NULL;
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    53
	}
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    54
	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    55
/*
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    56
 *	Methods from CProtTransaction
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
 */
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    59
void CHttpClientTransaction::CreateTxDataL()
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    60
	{
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
	__ASSERT_DEBUG( iConnectionManager != NULL, User::Invariant() );
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    63
	delete iTxData;
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    64
	iTxData = NULL;
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    65
	iTxData = CHttpRequestComposer::NewL(*this, *iConnectionManager);
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    66
	}
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    67
	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    68
void CHttpClientTransaction::CreateRxDataL(MRxDataObserver& aObserver)
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    69
	{
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    70
	__ASSERT_DEBUG( iConnectionManager != NULL, User::Invariant() );
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    71
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    72
	delete iRxData;
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    73
	iRxData = NULL;
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    74
	iRxData = CHttpResponseParser::NewL(*this, aObserver, *iConnectionManager);
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    75
	}
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    76
	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    77
void CHttpClientTransaction::IncRetryCount ()
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    78
	{
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    79
	++iRetryCount;		
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    80
	}
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    81
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    82
TBool CHttpClientTransaction::RetryNeeded ()
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    83
	{
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    84
	const TInt KMaxRetryCount = 3;	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    85
	return ( ( iTransactionState != ECancelled ) && 
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    86
			( iTransactionState != ECompleted ) && 
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    87
			( iRetryCount < KMaxRetryCount) );
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    88
	}
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    89
	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    90
TBool CHttpClientTransaction::NeedDisconnectNotification () const
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    91
    {
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    92
    TBool needDisconnectNotification = EFalse;
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    93
	RHTTPTransaction myTransaction = Transaction (); 
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    94
	RHTTPSession mySession = myTransaction.Session ();
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    95
	RStringPool myStringPool ( mySession.StringPool () );
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    96
	RStringF notifyOnDisconnect = myStringPool.StringF( HTTP::ENotifyOnDisconnect, iStringTable );
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    97
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    98
	RHTTPPropertySet transactionProperties = myTransaction.PropertySet();
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    99
	RHTTPPropertySet sessionProperties = mySession.ConnectionInfo();
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   100
    
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   101
	THTTPHdrVal hdrVal;
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   102
	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   103
	// Check the transaction properties for the disconnect notification
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   104
	// If it is set then it should be used.
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   105
	if ( transactionProperties.Property ( notifyOnDisconnect, hdrVal ) || sessionProperties.Property ( notifyOnDisconnect, hdrVal ) )	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   106
		{
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   107
		__ASSERT_DEBUG( hdrVal.Type() == THTTPHdrVal::KStrFVal, User::Invariant() );
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   108
		
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   109
		needDisconnectNotification = ( hdrVal.StrF().Index(iStringTable) == HTTP::EEnableDisconnectNotification );
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   110
		}
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   111
	return needDisconnectNotification;	
b16258d2340f Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   112
	}
20
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   113
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   114
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   115
TBool CHttpClientTransaction::PropogateDefaultError() const
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   116
    {
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   117
    TBool noRetry=EFalse;
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   118
    RHTTPTransaction myTransaction = Transaction (); 
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   119
    RHTTPSession mySession = myTransaction.Session ();
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   120
    RStringPool myStringPool ( mySession.StringPool () );
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   121
    RStringF retrySet = myStringPool.StringF( HTTP::ENotifyOnDisconnect, iStringTable );
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   122
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   123
    RHTTPPropertySet transactionProperties = myTransaction.PropertySet();
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   124
    RHTTPPropertySet sessionProperties = mySession.ConnectionInfo();
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   125
        
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   126
    THTTPHdrVal hdrVal;
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   127
        
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   128
    // Check the transaction properties for the disconnect notification
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   129
    // If it is set then it should be used.
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   130
    if ( transactionProperties.Property ( retrySet, hdrVal ) || sessionProperties.Property ( retrySet, hdrVal ) )   
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   131
        {
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   132
        __ASSERT_DEBUG( hdrVal.Type() == THTTPHdrVal::KStrFVal, User::Invariant() );
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   133
            
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   134
        noRetry = ( hdrVal.StrF().Index(iStringTable) == HTTP::EHttpPropagateDefaultError );
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   135
        }
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   136
    return noRetry;  
a0da872af3fa Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents: 19
diff changeset
   137
    }