Author: keith
Date: Wed Aug  6 11:31:58 2008
New Revision: 20490
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=20490

Log:
Using the customProtocolFactory in Proxy only when https sites are called



Modified:
   branches/mashup/java/1.5/java/modules/www/WSRequestXSSproxy.jsp

Modified: branches/mashup/java/1.5/java/modules/www/WSRequestXSSproxy.jsp
URL: 
http://wso2.org/svn/browse/wso2/branches/mashup/java/1.5/java/modules/www/WSRequestXSSproxy.jsp?rev=20490&r1=20489&r2=20490&view=diff
==============================================================================
--- branches/mashup/java/1.5/java/modules/www/WSRequestXSSproxy.jsp     
(original)
+++ branches/mashup/java/1.5/java/modules/www/WSRequestXSSproxy.jsp     Wed Aug 
 6 11:31:58 2008
@@ -142,11 +142,13 @@
 
     opts.setTo(new EndpointReference(uri));
     PersistenceManager pm = new PersistenceManager();
-    String adminUsername = 
pm.getConfigurationProperty(MashupConstants.PRIMARY_USER_ID);
-    if (adminUsername != null) {
+    if (uri.startsWith("https")) {
+        String adminUsername = 
pm.getConfigurationProperty(MashupConstants.PRIMARY_USER_ID);
+        if (adminUsername != null) {
             ProtocolSocketFactory psf = new 
CustomProtocolSocketFactory(adminUsername);
             Protocol protocol = new Protocol("custom-https", psf, 443);
             opts.setProperty(HTTPConstants.CUSTOM_PROTOCOL_HANDLER, protocol);
+        }
     }
 
     // Parse

_______________________________________________
Mashup-dev mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to