ncdengine/engine/transport/src/catalogshttpdownload.cpp
changeset 60 245df5276b97
parent 53 ae54820ef82c
child 64 48c14c385b0e
--- a/ncdengine/engine/transport/src/catalogshttpdownload.cpp	Tue Jul 06 14:23:31 2010 +0300
+++ b/ncdengine/engine/transport/src/catalogshttpdownload.cpp	Wed Aug 18 09:55:45 2010 +0300
@@ -25,6 +25,8 @@
 #include <escapeutils.h>
 #include <downloadmanager.h>
 
+#include <uri8.h> // HLa
+
 
 #include <QtGlobal>
 #include "catalogshttpdownloadmanagerimpl.h"
@@ -811,7 +813,8 @@
     iConfig->InternalizeL( aStream );
     HBufC8* contentType = NULL;
     InternalizeDesL( contentType, aStream );
-    if ( contentType->Length() > KMaxContentTypeLength ) 
+    // HLa if ( contentType->Length() > KMaxContentTypeLength ) 
+    if ( contentType->Length() > 256 )
         {
         DeletePtr( contentType );
         DLERROR(("Content type was too long, leaving with KErrCorrupt"));
@@ -1084,6 +1087,8 @@
 // Handles events from the download manager
 // ---------------------------------------------------------------------------
 //	
+
+/* HLa
 void CCatalogsHttpDownload::HandleEventL( THttpDownloadEvent aEvent )
     {
     DLTRACEIN((""));
@@ -1376,6 +1381,7 @@
         * Download process can be paused again. This event only occurs after
         * EHttpDlNonPausable. 
         */	
+/* HLa
         case EHttpDlPausable:
             {
             DLTRACE(( "Pausable" ));
@@ -1411,13 +1417,14 @@
             }	
         }
     }
-
+*/
 
 
 // ---------------------------------------------------------------------------
 // 
 // ---------------------------------------------------------------------------
 //	
+/*
 void CCatalogsHttpDownload::HandleEventProgressL( const 
     THttpDownloadEvent& aEvent )
     {
@@ -1691,7 +1698,7 @@
 			break;
 		}
     }
-    
+ */   
 
 
 // ---------------------------------------------------------------------------
@@ -1797,7 +1804,8 @@
         DLTRACE(("Updating the content type"));
         QString contentType;
         contentType= iDownload->attribute(WRT::ContentType).toString();
-        	TBuf<KMaxContentTypeLength>  ContentType(contentType.utf16());
+        // HLa TBuf<KMaxContentTypeLength>  ContentType(contentType.utf16());
+        TBuf<256>  ContentType(contentType.utf16());
         	iContentType.Copy(ContentType);
    
         }
@@ -1918,6 +1926,7 @@
     // Get the current url of the download
     RBuf8 buf;
     CleanupClosePushL( buf );
+    const TInt KMaxUrlLength = 2048;
     buf.CreateL( KMaxUrlLength );
     QString string;
 	try
@@ -2148,6 +2157,7 @@
 TUint CCatalogsHttpDownload::MatchWithPredefinedRequestHeader( 
     const TDesC8& aHeader ) const
     {
+    /* HLa
     if ( aHeader.CompareF( KHttpRequestAcceptHeader ) == 0 ) 
         {
         return EDlAttrRequestAccept;
@@ -2192,7 +2202,7 @@
         {
         return EDlAttrRequestVary;
         }
-    
+    */
     return 0;
     }
     
@@ -2205,6 +2215,7 @@
 TUint CCatalogsHttpDownload::MatchWithPredefinedGeneralHeader( 
     const TDesC8& aHeader ) const
     {
+    /* HLa
     if ( aHeader.CompareF( KHttpGeneralCacheControlHeader ) == 0 ) 
         {
         return EDlAttrGeneralCacheControl;
@@ -2224,7 +2235,8 @@
     else if ( aHeader.CompareF( KHttpGeneralWarningHeader ) == 0 ) 
         {
         return EDlAttrGeneralWarning;
-        }    
+        }
+        */    
     return 0;
     }
     
@@ -2237,6 +2249,7 @@
 TUint CCatalogsHttpDownload::MatchWithPredefinedEntityHeader( 
     const TDesC8& aHeader ) const
     {
+    /*
     if ( aHeader.CompareF( KHttpEntityAllowHeader ) == 0 ) 
         {
         return EDlAttrEntityAllow;
@@ -2261,6 +2274,7 @@
         {
         return EDlAttrEntityLastModified;
         }
+        */
     return 0;
     }
         
@@ -2300,6 +2314,9 @@
 
     TPtr8 ptr( aTarget->Des() );
     
+    _LIT8( KHttpFieldSeparator, "\n"); // HLa
+    const TInt KColon( ':' ); // HLa
+    
     if( newSize ) 
         {
         DLTRACE( ("Appending to existing headers") );