According to the Apache documentation, the 2 timeouts used on their sockets are the following:
CoreConnectionPNames.SO_TIMEOUT='http.socket.timeout': defines the socket timeout (SO_TIMEOUT) in milliseconds, which is the timeout for waiting for data or, put differently, a maximum period inactivity between two consecutive data packets). A timeout value of zero is interpreted as an infinite timeout. This parameter expects a value of type java.lang.Integer. If this parameter is not set, read operations will not time out (infinite timeout).
CoreConnectionPNames.CONNECTION_TIMEOUT='http.connection.timeout': determines the timeout in milliseconds until a connection is established. A timeout value of zero is interpreted as an infinite timeout. This parameter expects a value of type java.lang.Integer. If this parameter is not set, connect operations will not time out (infinite timeout).
Suppose I set both to 5s. If I perform an HTTP GET request on a slow server, and the following happens: The connnection is done within 5s. (CONNECTION_TIMEOUT is not triggered) IP packets keep trickling say every 4s (SO_TIMEOUT is not triggered) However it could take minutes for my HTTP GET or PUT to effectively complete. Is there a way to set a timeout to my overall GET or PUT request so that I can notify the user and/or give up.