Hi Michelle,

> I think you are right.  the apache httpclient code seems  hardcoded the
> local port to 0 when creating a socket. Sounds like this should not be a
> vista specific issue.

Port 0 is never used as a port number. Specifying 0 indicates to the OS
that any free port is acceptable. Looks like Vista, or the JVM on Vista,
doesn't know which ports are free.
> 
> This depends on some low level settings related to address re-use.
> 
> just wonder how you find those low level settings and maybe change it and
> make it working?

try this one:
http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html#setReuseAddress(boolean)

Create a custom ProtocolSocketFactory to contain the modified code:
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/protocol/ProtocolSocketFactory.html

It needs to be registered for Protocol "http":
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/protocol/Protocol.html#registerProtocol(java.lang.String,%20org.apache.commons.httpclient.protocol.Protocol)


hope that helps,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to