New HttpClient PUT request fails oddly - is it size is it number of invocations!

Daniel Fuchs daniel.fuchs at oracle.com
Tue Jun 26 14:56:51 UTC 2018


Hi Jaikiran,

On 26/06/2018 15:41, Jaikiran Pai wrote:
> So is this a case of the server implementation misbehaving? I haven't 
> checked what the expectations are from a spec point of view for handling 
> such requests on the server. Or is it a combination of a misbehaving 
> server plus the HttpClient implementation having some issue? I think the 
> fact that it fails after what appear to be a couple of successful 
> invocations and the odd nature of the exception message, makes it hard 
> to narrow this down from a client usage point of view.Thank you 
> narrowing this down quickly and for the -ea hints.

By default clients and server will keep the connection alive.
I suspect that data (request body) from the previous requests
were found by the server when it tried to parse the HTTP status
line of the following request, and it probably caused it to
close the connection without sending back any reply.

The client then simply got an EOF - which caused the exception
message you saw.

I don't think we can do more on the client side.
And I'm afraid the only way to get more information would
be to enable logging on the server, as there will be no
user code on the stack to relay the exception to when the
server finds the unexpected bytes.

best regards,

-- daniel




More information about the net-dev mailing list