Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Understanding AsyncMiddleManServlet request lifecycle

Hi,

On Tue, Nov 7, 2017 at 1:37 AM, Steven Schlansker
<stevenschlansker@xxxxxxxxx> wrote:
> I've done some more digging here, but I'm still not exactly sure what I'm observing.
>
> I think this observation is related to POSTing data that needs to be asynchronously proxied to the backend service.
>
> https://gist.github.com/stevenschlansker/ad5734d54765ab2f1a738a3345eafafa
>
> It looks to me like the request starts copying data, and goes to the DISPATCHED / ASYNC_IO / STREAM states.
> Then the onProxyResponseSuccess callback is invoked ("success" in the log)
>
> Then, the same (?) request gets re-dispatched and eventually goes DISPATCHED -> IDLE.

Yes, we reuse objects that belong to the same connection.

> This surprises me, I would have thought that the onProxyResponseSuccess callback is only called after the
> entire HTTP exchange is complete,

Nope, see previous email.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top