[jira] Updated: (HTTPCLIENT-599) Not possible to set socket lingering on with a socket linger time of 0

2006-10-01 Thread Oleg Kalnichevski (JIRA)
 [ http://issues.apache.org/jira/browse/HTTPCLIENT-599?page=all ]

Oleg Kalnichevski updated HTTPCLIENT-599:
-

Fix Version/s: 4.0 Alpha 1
   (was: 3.1 Beta 1)

Neil,
I finally had time to look into this issue. It is legitimate that someone may 
want to set socket linger value to zero in order to cause an abortive 
connection close. Unfortunately 3.x API does not permit modification of 
parameters of the underlying socket once the connection has been initialized 
and it does not make any sense to set linger value to 0 while the connection is 
still being initialized. It is not possible to resolve the problem without 
changing the API so the resolution of this issue will have to wait until 4.0.

Oleg

 Not possible to set socket lingering on with a socket linger time of 0
 --

 Key: HTTPCLIENT-599
 URL: http://issues.apache.org/jira/browse/HTTPCLIENT-599
 Project: HttpComponents HttpClient
  Issue Type: Bug
  Components: HttpClient
Affects Versions: 3.0.1
 Environment: Windows XP, Sun JVM 1.5.0_07
Reporter: Neil Ferguson
Priority: Minor
 Fix For: 4.0 Alpha 1


 In version 3.0.1 of the Commons HTTP Client it is not possible to set socket 
 lingering on, but with a socket linger time of 0. This may not appear to make 
 much sense, but (certainly with the Sun JVM) this is used to force abortive 
 connection release (see: 
 http://java.sun.com/j2se/1.5.0/docs/guide/net/articles/connection_release.html).
  
 In the org.apache.commons.httpclient.HttpConnection.open() method the 
 following code is what prevents this:
 if (linger  0) {
 socket.setSoLinger(linger  0, linger);
 }
 I have changed this to:
 if (linger = 0) {
 socket.setSoLinger(linger = 0, linger);
 }
 However this changes the meaning of the http.socket.linger parameter, so this 
 may not be the preferred solution. Perhaps turning socket lingering on and 
 off needs to be configured independently of the socket linger time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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



[jira] Updated: (HTTPCLIENT-599) Not possible to set socket lingering on with a socket linger time of 0

2006-09-13 Thread Oleg Kalnichevski (JIRA)
 [ http://issues.apache.org/jira/browse/HTTPCLIENT-599?page=all ]

Oleg Kalnichevski updated HTTPCLIENT-599:
-

Fix Version/s: 3.1 Beta 1
 Priority: Minor  (was: Major)

 Not possible to set socket lingering on with a socket linger time of 0
 --

 Key: HTTPCLIENT-599
 URL: http://issues.apache.org/jira/browse/HTTPCLIENT-599
 Project: HttpComponents HttpClient
  Issue Type: Bug
  Components: HttpClient
Affects Versions: 3.0.1
 Environment: Windows XP, Sun JVM 1.5.0_07
Reporter: Neil Ferguson
Priority: Minor
 Fix For: 3.1 Beta 1


 In version 3.0.1 of the Commons HTTP Client it is not possible to set socket 
 lingering on, but with a socket linger time of 0. This may not appear to make 
 much sense, but (certainly with the Sun JVM) this is used to force abortive 
 connection release (see: 
 http://java.sun.com/j2se/1.5.0/docs/guide/net/articles/connection_release.html).
  
 In the org.apache.commons.httpclient.HttpConnection.open() method the 
 following code is what prevents this:
 if (linger  0) {
 socket.setSoLinger(linger  0, linger);
 }
 I have changed this to:
 if (linger = 0) {
 socket.setSoLinger(linger = 0, linger);
 }
 However this changes the meaning of the http.socket.linger parameter, so this 
 may not be the preferred solution. Perhaps turning socket lingering on and 
 off needs to be configured independently of the socket linger time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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