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

Issue #10956 - Send Reset NO_ERROR for HTTP/2 #11029

Closed
wants to merge 13 commits into from

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Dec 7, 2023

For #10956

@joakime joakime changed the title Fix/jetty 12/110956/reset no error Issue #10956 - Send Reset NO_ERROR for HTTP/2 Dec 7, 2023
@gregw
Copy link
Contributor Author

gregw commented Dec 7, 2023

@sbordet interestingly this is passing tests. But I think there are some exceptions (that I am printing) that we should avoid.

@lorban Can you update this branch with the same kind of changes for h3 ?

if (expects100Continue)
{
expects100Continue = false;
send(requestMetaData, HttpGenerator.CONTINUE_100_INFO, false, null, Callback.NOOP);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now this makes me wonder if this isn't racing with a user-generated write? I mean such handler:

boolean handle(Request req, Response resp, Callback callback)
{
  req.demand(() -> {}); // this triggers a write with a NOOP callback
  resp.write(true, BufferUtil.EMPTY, callback); // doesn't this risk a WritePendingException?
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@review that in the other PR, this PR is based on #10957, so you are seeing both changes here.

@gregw
Copy link
Contributor Author

gregw commented Dec 11, 2023

@sbordet @lorban can you just review the parts of this that are extra to #10957

@sbordet I've made changes to the h2 server side to do the reset(NO_ERROR), but I've not yet changed the client side to handle it. Not exactly sure what we should do there (if anything). Need to chat.

@lorban can you look at duplicating the h2 changes in h3 once we agree they are correct.

Moved all 100 continues handling into HttpChannelState and protected it from concurrent writes
…/110956/Reset_NO_ERROR

# Conflicts:
#	jetty-core/jetty-http2/jetty-http2-server/src/main/java/org/eclipse/jetty/http2/server/internal/HttpStreamOverHTTP2.java
@gregw
Copy link
Contributor Author

gregw commented Dec 12, 2023

there is a better way.

@gregw gregw closed this Dec 12, 2023
@gregw gregw deleted the fix/jetty-12/110956/Reset_NO_ERROR branch December 12, 2023 20:21
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.

3 participants