Hi Jeff, Jeff C wrote: > Thanks! Now I'm wondering why this is happening in the first place. When > the files _do_ exist on the server, then my application largely doesn't use > different ports. So, is it the case that when I find out the file doesn't > exist on the server that it automatically forcefully terminates the > connection and does the ending tcp handshake (which therefore eventually > leads us to the TIME_WAIT state and renders that port unusable, even though > I still want to use it retrieve other files that may be on the same > server)? If so, is there a way to prevent that from happening and leave > the connection open?
A connection can only be kept open if _both_ client and server agree to use it for a subsequent request. HttpClient will always try to keep connections alive. If the server decides not do that, you'll have to fix the server. Personally, I think it is only prudent of a server to not re-use connections over which an error response has been sent. It is easy to forget that error responses come with a message body. You might try to send a HEAD instead of a GET request to see whether that makes a difference. I doubt it, though. cheers, Roland --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
