You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2023/05/02 17:32:34 UTC
[Bug 66589] New: Data frame included in response for 200 OK status with no body (content-length=0)
https://bz.apache.org/bugzilla/show_bug.cgi?id=66589
Bug ID: 66589
Summary: Data frame included in response for 200 OK status with
no body (content-length=0)
Product: Tomcat 9
Version: 9.0.x
Hardware: Macintosh
OS: Mac OS X 10.1
Status: NEW
Severity: normal
Priority: P2
Component: Connectors
Assignee: dev@tomcat.apache.org
Reporter: hypnoce@donarproject.org
Target Milestone: -----
Hi,
while investigating tomcat support for gRPC-servlet server, it seems that
tomcat is sending an empty data frame with end_stream flag uppon 200 status
response with no body (content-length=0).
This is not supported by gRPC:
https://github.com/grpc/grpc-java/blob/3c01bfe77f3d64d9ab97b28bc924105b3e72e8a7/servlet/src/tomcatTest/java/io/grpc/servlet/TomcatTransportTest.java#L254
https://github.com/grpc/grpc-java/blob/3c01bfe77f3d64d9ab97b28bc924105b3e72e8a7/core/src/main/java/io/grpc/internal/Http2ClientStreamTransportState.java#L150
Looking at the tomcat bug history, I came across
https://bz.apache.org/bugzilla/show_bug.cgi?id=66442. The fix
(https://github.com/apache/tomcat/commit/519403fb8aace2c64e1ee3999511719418dc6968)
only relies on the status code and not the content-length.
gRPC expects that only headers carry the end of stream flag from the server as
it never sends a data frame without a trailer frame.
Here is a possible fix :
https://github.com/hypnoce/tomcat/commit/27e6e3da7e5784b460da475a784d58f882fb1801
Let me know what you think.
Thanks
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [Bug 66589] Data frame included in response for 200 OK status with no body (content-length=0)
Posted by Mark Thomas <ma...@apache.org>.
Please do not hijack threads.
If you want to ask a new question, DO NOT reply to an existing message.
Create a new message, set an appropriate subject and send it to the
correct list.
Mark
On 03/05/2023 08:46, koteswara Rao Gundapaneni wrote:
> Hi
> I have my code established at my local for tomcat but struggling alott that
> how can I assigned with the PR and Bugs that the software has indeed
>
> Regards,
> Koti
>
> On Tue, May 2, 2023 at 1:35 PM <bu...@apache.org> wrote:
>
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=66589
>>
>> --- Comment #4 from hypnoce@donarproject.org ---
>> OK clear. Will check on the gRPC side then.
>>
>> --
>> You are receiving this mail because:
>> You are the assignee for the bug.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: dev-help@tomcat.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
Re: [Bug 66589] Data frame included in response for 200 OK status with no body (content-length=0)
Posted by koteswara Rao Gundapaneni <ko...@gmail.com>.
Hi
I have my code established at my local for tomcat but struggling alott that
how can I assigned with the PR and Bugs that the software has indeed
Regards,
Koti
On Tue, May 2, 2023 at 1:35 PM <bu...@apache.org> wrote:
> https://bz.apache.org/bugzilla/show_bug.cgi?id=66589
>
> --- Comment #4 from hypnoce@donarproject.org ---
> OK clear. Will check on the gRPC side then.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
[Bug 66589] Data frame included in response for 200 OK status with no body (content-length=0)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66589
--- Comment #4 from hypnoce@donarproject.org ---
OK clear. Will check on the gRPC side then.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 66589] Data frame included in response for 200 OK status with no body (content-length=0)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66589
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
I can't see anything in RFC 9113 that states that Tomcat's behaviour is not
allowed. On that basis, this would be considered a bug in gRPC and the Tomcat
team would expect it to be fixed in gRPC.
If I have missed the relevant text in RFC 9113 (always possible) please point
it out.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 66589] Data frame included in response for 200 OK status with no body (content-length=0)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66589
--- Comment #2 from hypnoce@donarproject.org ---
The RFC does not seem to have such requirement.
I think it's the same type of case as
https://bz.apache.org/bugzilla/show_bug.cgi?id=66442, where nothing in the RFC
prevents an empty dataframe with reset flag on status 204, but some client
implementation might be sensitive to such behaviour.
Not sure how this use case is more or less valid than the other one ?
Servlet 4 does not specify in which case data frames are sent.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 66589] Data frame included in response for 200 OK status with no body (content-length=0)
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=66589
--- Comment #3 from Mark Thomas <ma...@apache.org> ---
The difference is that RFC 9110 states that 204 responses are headers only. a
204 response cannot contain content.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org