95 else |
95 else |
96 { |
96 { |
97 iHttpChannel->SetExplicitIapDefined(EFalse); |
97 iHttpChannel->SetExplicitIapDefined(EFalse); |
98 iHttpChannel->HandleRunErrorL(aTransaction, aEvent.iStatus); |
98 iHttpChannel->HandleRunErrorL(aTransaction, aEvent.iStatus); |
99 } |
99 } |
|
100 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() returns"))); |
100 return; |
101 return; |
101 } |
102 } |
102 |
103 TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KMinLogLevel, _L8("CSenHttpEventHandler::statuscode( %d )"), aTransaction.Response().StatusCode())); |
103 switch (aEvent.iStatus) |
104 switch (aEvent.iStatus) |
104 { |
105 { |
105 case THTTPEvent::EGotResponseHeaders: |
106 case THTTPEvent::EGotResponseHeaders: |
106 TLSLOG_FORMAT((KSenHttpChannelLogChannelBase , KNormalLogLevel, _L8("CSenHttpEventHandler::statuscode( %d )"), |
107 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() EGotResponseHeaders"))); |
107 aTransaction.Response().StatusCode())); |
|
108 iHttpChannel->HandleResponseHeadersL(aTransaction); |
108 iHttpChannel->HandleResponseHeadersL(aTransaction); |
|
109 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() EGotResponseHeaders Completed"))); |
109 break; |
110 break; |
110 case THTTPEvent::EGotResponseBodyData: |
111 case THTTPEvent::EGotResponseBodyData: |
|
112 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() EGotResponseBodyData"))); |
111 iHttpChannel->HandleResponseBodyDataL(aTransaction); |
113 iHttpChannel->HandleResponseBodyDataL(aTransaction); |
112 iTries = 0; |
114 iTries = 0; |
|
115 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() EGotResponseBodyData Completed"))); |
113 break; |
116 break; |
114 case THTTPEvent::EResponseComplete: |
117 case THTTPEvent::EResponseComplete: |
|
118 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() EResponseComplete"))); |
115 break; |
119 break; |
116 case THTTPEvent::ESucceeded: |
120 case THTTPEvent::ESucceeded: |
|
121 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() ESucceeded"))); |
117 iHttpChannel->HandleResponseL(aTransaction); |
122 iHttpChannel->HandleResponseL(aTransaction); |
|
123 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() ESucceeded Completed"))); |
118 break; |
124 break; |
119 case THTTPEvent::EFailed: |
125 case THTTPEvent::EFailed: |
120 case THTTPEvent::EMoreDataReceivedThanExpected: |
126 case THTTPEvent::EMoreDataReceivedThanExpected: |
|
127 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() EMoreDataReceivedThanExpected | EFailed"))); |
121 iHttpChannel->HandleRunErrorL(aTransaction, |
128 iHttpChannel->HandleRunErrorL(aTransaction, |
122 aTransaction.Response().StatusCode()); |
129 aTransaction.Response().StatusCode()); |
|
130 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() EMoreDataReceivedThanExpected | EFailed Completed"))); |
123 break; |
131 break; |
124 case THTTPEvent::EUnrecoverableError: |
132 case THTTPEvent::EUnrecoverableError: |
|
133 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() EUnrecoverableError"))); |
125 iHttpChannel->HandleRunErrorL(aTransaction, KErrNoMemory); |
134 iHttpChannel->HandleRunErrorL(aTransaction, KErrNoMemory); |
|
135 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() EUnrecoverableError Completed"))); |
126 break; |
136 break; |
127 case THTTPEvent::ERedirectRequiresConfirmation: |
137 case THTTPEvent::ERedirectRequiresConfirmation: |
|
138 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() ERedirectRequiresConfirmation"))); |
128 iHttpChannel->HandleRedirectRequiresConfirmationL(aTransaction); |
139 iHttpChannel->HandleRedirectRequiresConfirmationL(aTransaction); |
|
140 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() ERedirectRequiresConfirmation Completed"))); |
129 break; |
141 break; |
130 case THTTPEvent::ERedirectedPermanently: |
142 case THTTPEvent::ERedirectedPermanently: |
131 case THTTPEvent::ERedirectedTemporarily: |
143 case THTTPEvent::ERedirectedTemporarily: |
132 case THTTPEvent::EGotResponseTrailerHeaders: |
144 case THTTPEvent::EGotResponseTrailerHeaders: |
|
145 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() ERedirectedPermanently | ERedirectedTemporarily | EGotResponseTrailerHeaders"))); |
133 break;// We don't process this event |
146 break;// We don't process this event |
134 default: |
147 default: |
|
148 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() default:"))); |
135 iHttpChannel->HandleRunErrorL(aTransaction, aEvent.iStatus); |
149 iHttpChannel->HandleRunErrorL(aTransaction, aEvent.iStatus); |
|
150 TLSLOG(KSenHttpChannelLogChannelBase , KMinLogLevel,(_L("CSenHttpEventHandler::MHFRunL() default: Completed"))); |
136 break; |
151 break; |
137 } |
152 } |
138 if (aTransaction.Response().StatusCode() == 401 && iTries < 4) |
153 if (aTransaction.Response().StatusCode() == 401 && iTries < 4) |
139 { |
154 { |
140 iTries++; |
155 iTries++; |