You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2007/04/05 09:21:08 UTC
svn commit: r525739 -
/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
Author: saminda
Date: Thu Apr 5 00:21:06 2007
New Revision: 525739
URL: http://svn.apache.org/viewvc?view=rev&rev=525739
Log:
Cleaning up the proxy handling code
Modified:
webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java?view=diff&rev=525739&r1=525738&r2=525739
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java (original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java Thu Apr 5 00:21:06 2007
@@ -110,7 +110,7 @@
protected void configProxyAuthentication(HttpClient client,
TransportOutDescription proxySetting,
HostConfiguration config,
- MessageContext msgCtx,String realHost, int realPort)
+ MessageContext msgCtx)
throws AxisFault {
Parameter proxyParam = proxySetting.getParameter(HTTPConstants.PROXY);
String usrName;
@@ -198,7 +198,6 @@
client.getState().setProxyCredentials(AuthScope.ANY, proxyCred);
config.setProxy(proxyHostName, proxyPort);
- config.setHost(realHost,realPort);
}
/**
@@ -314,7 +313,7 @@
MessageContext msgCtx,
URL targetURL)
throws AxisFault {
- boolean isHostProxy = isProxyListed(msgCtx); // list the proxy
+ boolean isProxyListed = isProxyListed(msgCtx); // list the proxy
boolean isAuthenticationEnabled = isAuthenticationEnabled(msgCtx);
@@ -338,12 +337,11 @@
this.setAuthenticationInfo(client, msgCtx, config, targetURL);
}
+ // setting the real host configuration
+ config.setHost(targetURL.getHost(), port, targetURL.getProtocol());
// proxy configuration
- if (!isHostProxy) {
- config.setHost(targetURL.getHost(), port, targetURL.getProtocol());
- } else {
- this.configProxyAuthentication(client, proxyOutSetting, config,
- msgCtx,targetURL.getHost(),port);
+ if (isProxyListed) {
+ this.configProxyAuthentication(client, proxyOutSetting, config, msgCtx);
}
return config;
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org