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 "Davanum Srinivas (JIRA)" <ji...@apache.org> on 2008/03/10 15:31:46 UTC

[jira] Resolved: (AXIS2-3146) Axis client fails if http.nonProxyHosts contains * as wildcard

     [ https://issues.apache.org/jira/browse/AXIS2-3146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Davanum Srinivas resolved AXIS2-3146.
-------------------------------------

    Resolution: Fixed

> Axis client fails if http.nonProxyHosts contains * as wildcard
> --------------------------------------------------------------
>
>                 Key: AXIS2-3146
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3146
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: transports
>    Affects Versions: 1.3
>         Environment: Websphere with jdk 1.4.2 / local XP machine with java5
>            Reporter: Bernd Frey
>            Assignee: Saminda Wishwajith Abeyruwan
>            Priority: Critical
>
> I get the following error if I have defined -Dhttp.nonProxyHosts=yyy|mbfq0202|*.epu.mycorp.com:
> java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
> *.epu.mycorp.com
> ^
> 	at java.util.regex.Pattern.error(Pattern.java:1650)
> 	at java.util.regex.Pattern.sequence(Pattern.java:1787)
> 	at java.util.regex.Pattern.expr(Pattern.java:1687)
> 	at java.util.regex.Pattern.compile(Pattern.java:1397)
> 	at java.util.regex.Pattern.<init>(Pattern.java:1124)
> 	at java.util.regex.Pattern.compile(Pattern.java:817)
> 	at java.util.regex.Pattern.matches(Pattern.java:919)
> 	at java.lang.String.matches(String.java:1921)
> 	at org.apache.axis2.transport.http.ProxyConfiguration.validateNonProxyHosts(ProxyConfiguration.java:261)
> 	at org.apache.axis2.transport.http.ProxyConfiguration.isProxyEnabled(ProxyConfiguration.java:223)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.getHostConfiguration(AbstractHTTPSender.java:271)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:502)
> 	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:191)
> 	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396)
> ...
> the problem is Axis2 does a String.match on "*.epu.mycorp.com" in ProxyConfiguration.validateNonProxyHosts. This must fail because "*.epu.mycorp.com" is a valid entry for http.nonProxyHosts, but it is not a valid regexp.
> I suggest to add
>         for (int i=0; i<nonProxyHostsArray.length; i++) {
>         	if (nonProxyHostsArray[i].startsWith("*")) {
>         		nonProxyHostsArray[i] = "\\w" + nonProxyHostsArray[i];
>         	}
>         }
> after
>         String[] nonProxyHostsArray = nonProxyHosts.split("\\|");
>         
> Bernd

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org