Search code examples
javaapacherestcxf

Java - How to retrieve HTTP timeout set by client on the server side with Apache CXF


My server exposes REST API using Apache CXF.

I would like to understand what is the ReceiveTimeout that a client has set for an HTTP request.

Is it possible to perform this action on the server-side?

What object / filter should I query? E.g. is it possible to gather such info using the Message retrieved using PhaseInterceptorChain.getCurrentMessage()?

Thanks!

cghersi


Solution

  • You can't. It isn't an 'HTTP timeout', it is a socket connect or read timeout, or both, and itis not visible outside the host, or indeed the application, that set it on the socket.

    Strange queston. The server should just serve the response as fast as it can. Hard to see how knowing the client timeout would help.