applayerpluginsandutils/httpprotocolplugins/httpclient/chttpconnectionmanager.cpp
equal
deleted
inserted
replaced
312 __ASSERT_DEBUG( responseIndex != KErrNotFound, User::Invariant() ); |
312 __ASSERT_DEBUG( responseIndex != KErrNotFound, User::Invariant() ); |
313 |
313 |
314 // The request has not been made - just need to remove the request and |
314 // The request has not been made - just need to remove the request and |
315 // response objects from the pending queues. |
315 // response objects from the pending queues. |
316 iPendingRequests.Remove(requestIndex); |
316 iPendingRequests.Remove(requestIndex); |
317 iPendingResponses.Remove(responseIndex); |
317 |
|
318 if (KErrNotFound != responseIndex) |
|
319 iPendingResponses.Remove(responseIndex); |
318 } |
320 } |
319 else if( responseIndex != KErrNotFound ) |
321 else if( responseIndex != KErrNotFound ) |
320 { |
322 { |
321 // The request has been sent but the response has not yet been received |
323 // The request has been sent but the response has not yet been received |
322 // and therefore need to stop the connection and remove response from |
324 // and therefore need to stop the connection and remove response from |
1279 { |
1281 { |
1280 // Read and try complete the response |
1282 // Read and try complete the response |
1281 TPtrC8 data; |
1283 TPtrC8 data; |
1282 __FLOG_0(_T8("!! doing an immediate socket read")); |
1284 __FLOG_0(_T8("!! doing an immediate socket read")); |
1283 TInt ret = iInputStream->ImmediateRead ( data ); |
1285 TInt ret = iInputStream->ImmediateRead ( data ); |
|
1286 if (ret) //we have some data read..so parse it |
|
1287 { |
|
1288 responseCompleted = iCurrentResponse->CompleteResponse ( data ); |
|
1289 } |
1284 if ( ( iPendingResponses.Count() == 0 ) || ret <= KErrNone ) |
1290 if ( ( iPendingResponses.Count() == 0 ) || ret <= KErrNone ) |
1285 { |
1291 { |
1286 __FLOG_0(_T8("!! Breaking from the loop")); |
1292 __FLOG_0(_T8("!! Breaking from the loop")); |
1287 // no further data is expected or there is a socket error |
1293 // no further data is expected or there is a socket error |
1288 break; |
1294 break; |
1289 } |
1295 } |
1290 responseCompleted = iCurrentResponse->CompleteResponse ( data ); |
|
1291 } |
1296 } |
1292 } |
1297 } |
1293 } |
1298 } |
1294 |
1299 |
1295 void CHttpConnectionManager::MOutputStreamObserver_Reserved() |
1300 void CHttpConnectionManager::MOutputStreamObserver_Reserved() |