Bug 66442

Summary: Data frame included in response for 204 No Content status
Product: Tomcat 9 Reporter: Violeta Georgieva <violetagg>
Component: ConnectorsAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 9.0.71   
Target Milestone: -----   
Hardware: PC   
OS: Mac OS X 10.1   

Description Violeta Georgieva 2023-01-25 10:00:24 UTC
Hi,

While investigating issue https://github.com/reactor/reactor-netty/issues/2664
where the server is Tomcat and the client is Reactor Netty, I'm observing that Tomcat sends (the logs below are from the client side):

HEADERS: streamId=3 headers=DefaultHttp2Headers[:status: 204, date: Wed, 25 Jan 2023 07:46:07 GMT] padding=0 endStream=false

DATA: streamId=3 padding=0 endStream=true length=0 bytes=

I expect that for responses 204/304 Tomcat will send only HEADERS with endStream=true as these kind of response are defined as "no content".

A reproducible example can be found in the linked issue above.

Regards,
Violeta
Comment 1 Mark Thomas 2023-01-25 10:01:43 UTC
I can see what the problem is and I think I have a fix for this. Just need to work on some additional unit tests and confirm the fix works as intended.
Comment 2 Mark Thomas 2023-01-25 16:45:29 UTC
Fixed in:
- 11.0.x for 11.0.0-M3 onwards
- 10.1.x for 10.1.6 onwards
-  9.0.x for  9.0.72 onwards
-  8.5.x for  8.5.86 onwards
Comment 3 Violeta Georgieva 2023-01-26 13:29:19 UTC
Thanks a lot