Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Empty object as Data of length and not RST_STREAM #2569

Open
HighOnLemonz opened this issue Nov 6, 2024 · 1 comment
Open

Send Empty object as Data of length and not RST_STREAM #2569

HighOnLemonz opened this issue Nov 6, 2024 · 1 comment
Labels
question Further information is requested

Comments

@HighOnLemonz
Copy link

Hi,
I have a proto file with the following rpc:
rpc MethodToCall(ObjectToReceive) returns (Empty);
where Empty is declared in the proto file as:
message Empty {}.

After using Grpc.Tools to generate the files I have override this method as follows:
public override Task MethodToCall(ObjectToReceive request, ServerCallContext context)
{
return Task.FromResult(new Empty());
}

In wireshark the response looks like this:
image

Problem is that what I need is the response to have an actual Data field of length 0 as follows:
image
where the Data is:
image

I am using .Net Framework 4.7.2.
Can I force the library to send the response like this or it will always decide not to send irrelevant data.

Thank you

@HighOnLemonz HighOnLemonz added the question Further information is requested label Nov 6, 2024
@JamesNK
Copy link
Member

JamesNK commented Dec 7, 2024

I don't know why you're seeing a RST_STREAM. If a request sends a response message, even an empty one, then the response should end with a HEADERS frame with END_STREAM set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants