[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: PATCH: KHTML - properly send SSL meta data
From:       Dawit Alemayehu <adawit () kde ! org>
Date:       2001-07-28 14:19:20
[Download RAW message or body]

On Saturday 28 July 2001 01:36, George Staikos wrote:
> On Friday 27 July 2001 23:30, Dawit Alemayehu wrote:
> > Hi,
> >
> > This patch is intended to fix required meta-data not being sent when
> > clicking a link on an SSL page.
>
>    I just tried it on https://www.ibm.com and it doesn't pass through the
> parent frame flag at all still....

Okay after further investigation, my patch indeed fixes all the remaining 
transmission problems of ssl-* meta-data except in one case.  And that
is whenever khtml tries to download embeded images in a web page, or
external CSS files... anything that is done through loader.*.  I am not 
sure if it is even necessary to set the meta-data tags under these 
circumstances.  

Now the reason why the warnings are not activated is a completely different
matter/bug.  The code in KonqRun::scanFile(), when attempting to determine 
whether or not SSL was in use, was incorrectly using the current URL which of 
course is wrong.  The patch below fixes that.  However, I have no idea why the 
opposite does not work.  That is the warning when leaving an SSL page to a non-
SSL page.  I'll leave that one up to you since I need to get some rest now... :)

Regards,
Dawit A.
["konq_run.diff" (text/x-diff)]

Index: konq_run.cc
===================================================================
RCS file: /home/kde/kdebase/konqueror/konq_run.cc,v
retrieving revision 1.58
diff -u -p -b -B -w -r1.58 konq_run.cc
--- konq_run.cc	2001/07/24 17:55:46	1.58
+++ konq_run.cc	2001/07/28 14:15:38
@@ -143,6 +143,7 @@ void KonqRun::foundMimeType( const QStri
 
 void KonqRun::scanFile()
 {
+  kdDebug(1202) << "KonqRun::scanfile" << endl;
   // WABA: We directly do a get for http.
   // There is no compelling reason not to do use this with other protocols
   // as well, but only http has been tested so far.
@@ -169,16 +170,21 @@ void KonqRun::scanFile()
     }
   }
 
-  KIO::TransferJob *job;
-  if (m_strURL.protocol().startsWith("https")) {
+  if (m_pView )
+  {
+      kdDebug(1202) << "old URL= " << m_pView->url().url() << endl;
+      kdDebug(1202) << "new URL= " << m_strURL.url() << endl;
+      if (m_pView->url().protocol().startsWith("https")) {
      m_req.args.metaData().insert("main_frame_request", "TRUE" );
      m_req.args.metaData().insert("ssl_was_in_use", "TRUE" );  
      m_req.args.metaData().insert("ssl_activate_warnings", "TRUE" );
-  } else if (m_strURL.protocol().startsWith("http")) {
+      } else if (m_pView->url().protocol().startsWith("http")) {
      m_req.args.metaData().insert("ssl_activate_warnings", "TRUE" );
      m_req.args.metaData().insert("ssl_was_in_use", "FALSE" );  
   }
+  }
 
+  KIO::TransferJob *job;
   if ( m_req.args.doPost() && m_strURL.protocol().startsWith("http"))
   {
       job = KIO::http_post( m_strURL, m_req.args.postData, false );
@@ -205,7 +211,7 @@ void KonqRun::scanFile()
 
 void KonqRun::slotKonqScanFinished(KIO::Job *job)
 {
-  kdDebug(1202) << "slotKonqScanFinished" << endl;
+  kdDebug(1202) << "KonqRun::slotKonqScanFinished" << endl;
   if ( job->error() == KIO::ERR_IS_DIRECTORY )
   {
       // It is in fact a directory. This happens when HTTP redirects to FTP.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic