Helpviewer/HelpBrowserWV.py

changeset 657
099d1ab9073e
parent 656
2f4496b1956f
child 658
2856f7ea6780
diff -r 2f4496b1956f -r 099d1ab9073e Helpviewer/HelpBrowserWV.py
--- a/Helpviewer/HelpBrowserWV.py	Wed Oct 06 08:46:55 2010 +0200
+++ b/Helpviewer/HelpBrowserWV.py	Wed Oct 06 19:54:56 2010 +0200
@@ -308,33 +308,24 @@
         
         if mainFrameRequest and \
            self.__sslInfo is not None and \
-           not self.__domainSchemeMatch(reply.url(), self.__sslInfo.url):
+           reply.url() == self.mainFrame().url():
             self.__sslInfo = None
         
         if reply.error() == QNetworkReply.NoError and \
            mainFrameRequest and \
            self.__sslInfo is None and \
-           reply.url().scheme().lower() == "https":
+           reply.url().scheme().lower() == "https" and \
+           reply.url() == self.mainFrame().url():
             self.__sslInfo = reply.sslConfiguration().peerCertificate()
             self.__sslInfo.url = QUrl(reply.url())
     
-    def __domainSchemeMatch(self, url1, url2):
-        """
-        Private method to check, if to URLs belong to the same domain.
-        
-        @param url1 first URL (QUrl)
-        @param url2 second URL (QUrl)
-        @return flag indicating a match (boolean)
+    def getSslInfo(self):
         """
-        if url1.scheme() != url2.scheme():
-            return False
+        Public method to get a reference to the SSL info object.
         
-        url1L = url1.host().lower().split(".")
-        url2L = url2.host().lower().split(".")
-        if min(len(url1L), len(url2L)) < 2:
-            return False
-        
-        return url1L[-2:] == url2L[-2:]
+        @return reference to the SSL info (QSslCertificate)
+        """
+        return self.__sslInfo
 
 ##########################################################################################
 

eric ide

mercurial