Skip to content

Do not retry the request when the headers/body were sent. #1626

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

Merged
merged 1 commit into from
May 7, 2021

Conversation

violetagg
Copy link
Member

Fixes #1622

Copy link
Contributor

@simonbasle simonbasle left a comment

Choose a reason for hiding this comment

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

no objection from my side, but I'd like you to discuss the RFC part with @rstoyanchev since it technically authorizes to retry some verbs and idempotent operations

@violetagg
Copy link
Member Author

@rstoyanchev @simonbasle Thanks for the review

@violetagg violetagg changed the base branch from issue-1622 to 0.9.x May 7, 2021 11:36
@crankydillo
Copy link

crankydillo commented Jun 23, 2021

no objection from my side, but I'd like you to discuss the RFC part with @rstoyanchev since it technically authorizes to retry some verbs and idempotent operations

@violetagg We just want to triple check on the result of this discussion.. Based on this change, it looks like you decided to never retry requests, even idempotent ones that the HTTP 1.1 spec technically says you can (e.g. DELETE), if the request headers have been sent. Is that correct?

@violetagg
Copy link
Member Author

@crankydillo https://datatracker.ietf.org/doc/html/rfc7230#section-6.3.1

When an inbound connection is closed prematurely, a client MAY open a
   new connection and automatically retransmit an aborted sequence of
   requests if all of those requests have idempotent methods

Yes as there is no strong requirement we decided to support retry only in case no headers are sent.

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.

HttpClient retry may cause "unexpected message type: DefaultFullHttpRequest, state: 1"
4 participants