Anonymous - 2004-09-09

Hi there,
In trying to test a site I was getting this exception:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: End user tried to act as a CA

to fix it, I created a DNSListener

DNSListener aListener = new DNSListener() {
    public String getIpAddress( String hostName ) {
        if (hostName.equals( "realserver.domain.com" )) return "192.168.1.23";
        return hostName;
    }
};

and then to specify for my client added: wc.getClientProperties().setDnsListener( aListener )

Now to my problem:
Instead of the ssl problems, im now getting an HTTP request error: 400 Bad Request. 
However, the url that gave the HttpException works just fine when i paste it into my browser.

Anyone have any idea how to fix this??

much appreciated