Skip to content

servlet: Avoid sending Trailers-Only responses - #13186

Open
kannanjgithub wants to merge 1 commit into
grpc:masterfrom
kannanjgithub:tomcat-avoid-sending-trailers-only
Open

kannanjgithub wants to merge 1 commit into
grpc:masterfrom
kannanjgithub:tomcat-avoid-sending-trailers-only

Conversation

@kannanjgithub

Copy link
Copy Markdown
Contributor

Tomcat does not set END_STREAM on a Trailers-Only HEADERS frame; it terminates the stream with an empty DATA frame instead, which the client rejects as "Received unexpected EOS on empty DATA frame from server", discarding the real status. Always send headers followed by trailers. This fixes flaky TomcatInteropTest failures and re-enables the Tomcat interop and transport tests that were ignored for lack of trailers-only support.

Since servlet servers now deliver their own status when the server-side deadline fires first (rather than resetting the stream), AbstractInteropTest.deadlineExceeded also accepts the server's "context timed out" description. AbstractTransportTest's earlyServerClose_noServerHeaders now accepts comma-joined duplicate ASCII trailer values, as basicStream already does, since servlet trailers are set via a Map<String, String>.

Tomcat does not set END_STREAM on a Trailers-Only HEADERS frame; it
terminates the stream with an empty DATA frame instead, which the client
rejects as "Received unexpected EOS on empty DATA frame from server",
discarding the real status. Always send headers followed by trailers.
This fixes flaky TomcatInteropTest failures and re-enables the Tomcat
interop and transport tests that were ignored for lack of trailers-only
support.

Since servlet servers now deliver their own status when the server-side
deadline fires first (rather than resetting the stream),
AbstractInteropTest.deadlineExceeded also accepts the server's
"context timed out" description. AbstractTransportTest's
earlyServerClose_noServerHeaders now accepts comma-joined duplicate
ASCII trailer values, as basicStream already does, since servlet
trailers are set via a Map<String, String>.

TAG=agy
CONV=367f1e32-a85a-4e2f-99f3-3ac0e3d14e20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant