On 09/04/2019 08:50, Rémy Maucherat wrote:

<snip/>

> Thanks for the fix. I can indeed see that HttpParser.onHeadersComplete has:
>         output.headersEnd(streamId); // <- dispatch is done here
> 
>         if (headersEndStream) {
>             output.receivedEndOfStream(streamId);
>             headersEndStream = false;
>         }
> 
> I guess it's possible to rely on syncing but normally thread dispatching
> should not occur until after the state is properly set, it's simply safer.

I did think about swapping the order of those statements. When I tested
it I saw one test failure with trailer headers (I didn't investigate
further) so I went for a different solution.

It may be the swapping the order is safe but that would need more
investigation. Also, triggering EOS before end of headers just seems
wrong to me.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to