Hello,

i checked the http headers (with tcpdump):

the xmlrpc-client sends a http 1.1 request with

  Connection: keep-alive

in the header. This is useless in http 1.1 because
- permanent connections are the default
- only "Connection: Close" is supported

The server sends the response without a "Connection:" entry
in the (http 1.1) header. This means the client should keep
the connection open.

After a few seconds, the client closes the connection.

Does the client expect a "Connection: keep-alive" from the
server?

Michael


Michael Shillinger wrote:
Michael,

Are you sure the client is closing the connection and not the server?

The server needs to support and allow keep-alive.

When you setKeepAlive(true) you are simply telling the server that want and can handle 
a persistent connection.

The Server will normally respond whether will it allow keep-alive using,

Connection: Keep-Alive
-or-
Connection: close

see http://www.io.com/~maus/HttpKeepAlive.html for more info.


Check the header in the response to see how the server is responding.

The best way to check is to use a sniffer (like Ethereal http://www.ethereal.com/)



Mike

Reply via email to