Skip to content

[HttpClient] don't fallback to HTTP/1.1 when HTTP/2 streams break #39115

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
Nov 19, 2020

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix composer/composer#9481
License MIT
Doc PR -

With this change, I don't reproduce the failures that I describe in composer/composer#9481 when running the script in #38690

Apparently curl has an issue when both h1.1 and h2 connections are open to the same host.

Instead of switching to HTTP/1.1 when retrying requests that failed because of an HTTP/2 stream error, I propose to close the http/2 connection when issuing a retry.

With this change, running the mirroring script of packagist works like a charm.

No need to investigate your mirrors @Seldaek, this was definitely a data corruption issue.

@fabpot
Copy link
Member

fabpot commented Nov 19, 2020

Thank you @nicolas-grekas.

@fabpot fabpot merged commit b60bb6e into symfony:4.4 Nov 19, 2020
@Seldaek
Copy link
Member

Seldaek commented Nov 19, 2020

Thanks @nicolas-grekas - hopefully that does solve this very sneaky issue.

Sounds to me like it'd be worth a bug report to curl too though, if you have enough details to send them.

@nicolas-grekas nicolas-grekas deleted the hc-fix branch November 19, 2020 07:51
This was referenced Nov 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants