webengine/osswebengine/WebCore/platform/network/symbian/SelfDownloadContentHandler.cpp
--- a/webengine/osswebengine/WebCore/platform/network/symbian/SelfDownloadContentHandler.cpp Tue Aug 31 16:17:46 2010 +0300
+++ b/webengine/osswebengine/WebCore/platform/network/symbian/SelfDownloadContentHandler.cpp Wed Sep 01 12:28:30 2010 +0100
@@ -19,8 +19,8 @@
// INCLUDE FILES
#include "BrCtl.h"
#include "SelfDownloadContentHandler.h"
-#include <BrCtlSpecialLoadObserver.h>
-#include <BrCtlDefs.h>
+#include <brctlspecialloadobserver.h>
+#include <brctldefs.h>
#include <apmstd.h>
#include <eikenv.h>
#include "ResourceRequest.h"
@@ -30,7 +30,7 @@
#include "ResourceLoaderDelegate.h"
#include "HttpSessionManager.h"
#include "httpfiltercommonstringsext.h"
-#include <uri8.h>
+#include <Uri8.h>
#include <http/rhttptransaction.h>
#include <http/mhttpdatasupplier.h>
#include <http/rhttpsession.h>
@@ -266,6 +266,7 @@
case KErrAbort:
default: {
HandleError(httpEvent.iStatus);
+ httpTransaction.Close();
break;
}
}
@@ -410,6 +411,7 @@
HttpFilterCommonStringsExt::GetTable()) );
}
StaticObjectsContainer::instance()->resourceLoaderDelegate()->httpSessionManager()->ResetOutstandingSelfDl();
+ httpTransaction.Close();
return status;
}
@@ -436,9 +438,30 @@
{
// Check if the Host Application included this MIME type in the self-download
// content types
- TInt index(m_SelfDlMimeTypes->FindF(contentType));
- return (index != KErrNotFound);
- }
+ TInt cTLength = contentType.Length();
+ TBool isSelfDownloadContentType = EFalse;
+ TInt index = KErrNotFound;
+ const TChar KBrowserSpecLoadObsSemicolon = ';';
+ TPtrC selfDownloadCTs=m_SelfDlMimeTypes->Des();
+ index = selfDownloadCTs.FindF( contentType );
+ while( index != KErrNotFound )
+ {
+ // check for ';' on the left KSemicolon
+ if ( index == 0 ||selfDownloadCTs[ index - 1 ] == KBrowserSpecLoadObsSemicolon )
+ {
+ // check for ';' on the right
+ index += cTLength;
+ if ( index == selfDownloadCTs.Length() || selfDownloadCTs[ index ] == KBrowserSpecLoadObsSemicolon )
+ {
+ isSelfDownloadContentType = ETrue;
+ break;
+ }
+ }
+ selfDownloadCTs.Set( selfDownloadCTs.Mid( index ) );
+ index = selfDownloadCTs.FindF( contentType );
+ }
+ return (isSelfDownloadContentType);
+}
// -----------------------------------------------------------------------------
// SelfDownloadContentHandler::ReinitializeSpecialLoadObserver