Re: RFR: 7199862: Make sure that a connection is still alive when retrieved from KeepAliveCache in certain cases

2012-09-25 Thread Chris Hegarty

Hi Rob,

Since you have limited the scope of the available() call to just 
requests that cannot be automatically retried (streaming POSTs), then I 
think this change is fine, and a useful addition.


The source changes are mainly fine, just a few minor comments...

 - HttpClient.available()
   maybe you should throw IOException(Unexpected data on socket), if
   the short timed read actually reads any data, i.e. if socket timeout
   exception is not thrown, or EOF reached.

 - Trivially, can you adjust the indentation of multi-arg methods in
   HttpClient, e.g.
public static HttpClient New(URL url, Proxy p, int to,
 HttpURLConnection httpuc)
throws IOException
{

}

Thanks,
-Chris.

On 20/09/12 16:26, Rob McKenna wrote:

Hi folks,

This one is connected to 7199219 and has an intersecting change in that
we're similarly passing the httpuc from HttpURLConnection. Despite the
intersection I've filed these as two separate issues because a) they are
and b) I wouldn't like one to be held up by the other.

The problem here is that for a specific type of request (streaming POST)
we don't have the option of retrying the request if there is an issue
with the connection. A customer has run into a problem where their proxy
was unilaterally deciding when to close connections (without paying
attention to the servers keep-alive timeout) earlier than our
KeepAliveCache expected. In this case our POST would fail with odd http
response codes.

http://cr.openjdk.java.net/~robm/7199862/8/webrev.01/
http://cr.openjdk.java.net/%7Erobm/7199862/8/webrev.01/

 -Rob


RFR: 7199862: Make sure that a connection is still alive when retrieved from KeepAliveCache in certain cases

2012-09-20 Thread Rob McKenna

Hi folks,

This one is connected to 7199219 and has an intersecting change in that 
we're similarly passing the httpuc from HttpURLConnection. Despite the 
intersection I've filed these as two separate issues because a) they are 
and b) I wouldn't like one to be held up by the other.


The problem here is that for a specific type of request (streaming POST) 
we don't have the option of retrying the request if there is an issue 
with the connection. A customer has run into a problem where their proxy 
was unilaterally deciding when to close connections (without paying 
attention to the servers keep-alive timeout) earlier than our 
KeepAliveCache expected. In this case our POST would fail with odd http 
response codes.


http://cr.openjdk.java.net/~robm/7199862/8/webrev.01/ 
http://cr.openjdk.java.net/%7Erobm/7199862/8/webrev.01/


-Rob