294 { |
294 { |
295 urlLen = iData.Length() - position -1; |
295 urlLen = iData.Length() - position -1; |
296 } |
296 } |
297 |
297 |
298 //R->fake the url |
298 //R->fake the url |
299 HBufC* newUrl = HBufC::NewL( urlLen ); |
299 newUrl = HBufC::NewL( urlLen ); |
300 newUrl->Des().Copy(iData.Mid( position + 1, urlLen-1 )); |
300 newUrl->Des().Copy(iData.Mid( position + 1, urlLen-1 )); |
301 newUrl->Des().ZeroTerminate(); |
301 newUrl->Des().ZeroTerminate(); |
302 |
302 |
303 // Transfer ownership before calling Response |
303 // Transfer ownership before calling Response |
304 TUint8* data = new TUint8[position]; |
304 TUint8* data = new TUint8[position]; |
311 |
311 |
312 // Send the response |
312 // Send the response |
313 iFileLoader->PartialResponse( (TUint16*)newUrl->Ptr(), dataDes, NULL, contentTypeString, NULL, NW_FALSE, // multipart information is missing. |
313 iFileLoader->PartialResponse( (TUint16*)newUrl->Ptr(), dataDes, NULL, contentTypeString, NULL, NW_FALSE, // multipart information is missing. |
314 NULL, NULL, charset, NULL, Success, NW_URL_METHOD_GET, iTransId, 0 /*first chunk*/, NULL, dataDes.Length(), |
314 NULL, NULL, charset, NULL, Success, NW_URL_METHOD_GET, iTransId, 0 /*first chunk*/, NULL, dataDes.Length(), |
315 KErrNone, iLoadContext, iLoadCallback); |
315 KErrNone, iLoadContext, iLoadCallback); |
316 delete newUrl; |
|
317 } |
316 } |
318 |
317 |
319 // Send the close response |
318 // Send the close response |
320 iContentType = NULL; |
319 iContentType = NULL; |
321 TPtr8 emptyData(NULL,0,0); |
320 TPtr8 emptyData(NULL,0,0); |
322 contentTypeString = iContentType; |
321 contentTypeString = iContentType; |
323 |
322 |
324 iFileLoader->PartialResponse( responseUrl, emptyData, NULL, contentTypeString, NULL, NW_FALSE, // multipart information is missing |
323 iFileLoader->PartialResponse( responseUrl, emptyData, NULL, contentTypeString, NULL, NW_FALSE, // multipart information is missing |
325 NULL, NULL, charset, NULL, Success, iMethod, iTransId, -1 /*last chunk*/, NULL, contentLength, |
324 NULL, NULL, charset, NULL, Success, iMethod, iTransId, -1 /*last chunk*/, NULL, contentLength, |
326 KErrNone, iLoadContext, iLoadCallback); |
325 KErrNone, iLoadContext, iLoadCallback); |
|
326 |
|
327 delete newUrl; |
327 } |
328 } |
328 else |
329 else |
329 { |
330 { |
330 // No response sent with this content type string, |
331 // No response sent with this content type string, |
331 // (so no subsequent delete) delete it here. |
332 // (so no subsequent delete) delete it here. |