408 |
409 |
409 propSet.RemoveProperty( strPool.StringF(HttpFilterCommonStringsExt::ESelfDownloadCallback, |
410 propSet.RemoveProperty( strPool.StringF(HttpFilterCommonStringsExt::ESelfDownloadCallback, |
410 HttpFilterCommonStringsExt::GetTable()) ); |
411 HttpFilterCommonStringsExt::GetTable()) ); |
411 } |
412 } |
412 StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->ResetOutstandingSelfDl(); |
413 StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->ResetOutstandingSelfDl(); |
|
414 httpTransaction.Close(); |
413 return status; |
415 return status; |
414 } |
416 } |
415 |
417 |
416 // ----------------------------------------------------------------------------- |
418 // ----------------------------------------------------------------------------- |
417 // SelfDownloadContentHandler::HandleError |
419 // SelfDownloadContentHandler::HandleError |
434 TBool SelfDownloadContentHandler::IsSelfDownloadContent( |
436 TBool SelfDownloadContentHandler::IsSelfDownloadContent( |
435 TDesC& contentType) |
437 TDesC& contentType) |
436 { |
438 { |
437 // Check if the Host Application included this MIME type in the self-download |
439 // Check if the Host Application included this MIME type in the self-download |
438 // content types |
440 // content types |
439 TInt index(m_SelfDlMimeTypes->FindF(contentType)); |
441 TInt cTLength = contentType.Length(); |
440 return (index != KErrNotFound); |
442 TBool isSelfDownloadContentType = EFalse; |
441 } |
443 TInt index = KErrNotFound; |
|
444 const TChar KBrowserSpecLoadObsSemicolon = ';'; |
|
445 TPtrC selfDownloadCTs=m_SelfDlMimeTypes->Des(); |
|
446 index = selfDownloadCTs.FindF( contentType ); |
|
447 while( index != KErrNotFound ) |
|
448 { |
|
449 // check for ';' on the left KSemicolon |
|
450 if ( index == 0 ||selfDownloadCTs[ index - 1 ] == KBrowserSpecLoadObsSemicolon ) |
|
451 { |
|
452 // check for ';' on the right |
|
453 index += cTLength; |
|
454 if ( index == selfDownloadCTs.Length() || selfDownloadCTs[ index ] == KBrowserSpecLoadObsSemicolon ) |
|
455 { |
|
456 isSelfDownloadContentType = ETrue; |
|
457 break; |
|
458 } |
|
459 } |
|
460 selfDownloadCTs.Set( selfDownloadCTs.Mid( index ) ); |
|
461 index = selfDownloadCTs.FindF( contentType ); |
|
462 } |
|
463 return (isSelfDownloadContentType); |
|
464 } |
442 |
465 |
443 // ----------------------------------------------------------------------------- |
466 // ----------------------------------------------------------------------------- |
444 // SelfDownloadContentHandler::ReinitializeSpecialLoadObserver |
467 // SelfDownloadContentHandler::ReinitializeSpecialLoadObserver |
445 // ----------------------------------------------------------------------------- |
468 // ----------------------------------------------------------------------------- |
446 void SelfDownloadContentHandler::ReinitializeSpecialLoadObserver(WebFrame* webFrame) |
469 void SelfDownloadContentHandler::ReinitializeSpecialLoadObserver(WebFrame* webFrame) |