webengine/osswebengine/WebCore/platform/network/symbian/DataConnection.cpp
branchRCL_3
changeset 47 e1bea15f9a39
parent 37 ac77f89b1d9e
child 48 79859ed3eea9
equal deleted inserted replaced
46:30342f40acbf 47:e1bea15f9a39
   157                     body->Des().Copy( data );
   157                     body->Des().Copy( data );
   158                 }
   158                 }
   159             }
   159             }
   160         }
   160         }
   161     }
   161     }
   162     m_maxSize = body->Length();
   162     if(body != NULL)
       
   163         m_maxSize = body->Length();
   163 }
   164 }
   164 
   165 
   165 void DataConnection::cancel()
   166 void DataConnection::cancel()
   166 {
   167 {
   167     if (m_scheduler) {
   168     if (m_scheduler) {
   200 
   201 
   201     HBufC8* contentType = NULL;
   202     HBufC8* contentType = NULL;
   202     HBufC8* encoding = NULL;
   203     HBufC8* encoding = NULL;
   203     HBufC8* body = NULL;
   204     HBufC8* body = NULL;
   204     parseUrlLC(contentType, encoding, body);
   205     parseUrlLC(contentType, encoding, body);
   205 
   206     if(body != NULL)
   206     ResourceResponse response(m_handle->request().url().des(), contentType->Des(), body->Length(), encoding->Des(), String() );
   207         {
   207     CResourceHandleManager::self()->receivedResponse(m_handle, response, this);
   208         ResourceResponse response(m_handle->request().url().des(), contentType->Des(), body->Length(), encoding->Des(), String() );
   208     CResourceHandleManager::self()->receivedData(m_handle, body->Des(), body->Length(), this);
   209         CResourceHandleManager::self()->receivedResponse(m_handle, response, this);
       
   210         CResourceHandleManager::self()->receivedData(m_handle, body->Des(), body->Length(), this);
       
   211         }
   209     CResourceHandleManager::self()->receivedFinished(m_handle, KErrNone, this);
   212     CResourceHandleManager::self()->receivedFinished(m_handle, KErrNone, this);
   210     CleanupStack::PopAndDestroy(3); // contentType, encoding, body
   213     if(body != NULL)
       
   214         CleanupStack::PopAndDestroy(3); // contentType, encoding, body
       
   215     else
       
   216         CleanupStack::PopAndDestroy(2); // contentType, encoding
   211     derefHandle();
   217     derefHandle();
   212     }
   218     }
   213 
   219 
   214 // end of file
   220 // end of file