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

Alistair Young commented on AXIS2-3146:
---------------------------------------

I've just upgraded to OS X 10.5 Leopard and get the same error with Axis2 1.3. 
The only way round it is to:

System.setProperty("http.nonProxyHosts", "");

> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to