Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[HttpClient] improve handling of HTTP/2 PUSH, disable it by default#33444

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:4.3fromnicolas-grekas:hc-push
Sep 3, 2019

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedSep 3, 2019
edited
Loading

QA
Branch?4.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

This follows discussions with@dunglas
For the test cases,https://http2-push.io is down, let's use Akamai instead

This PR now considers the proxy settings before accepting a pushed response.
It also splits the responsibility of dealing with accepting pushed responses in methodacceptPushForRequest.

The logic in this method could also be delegated to a userland callback passed as an option. Let's wait for someone with an actual use case before adding the option.

This PR also disables HTTP/2 PUSH by default because it is not stable: locally, with the latest curl version, enabling this on a server that pushes things fails withFailure when receiving data from the peer. This is not ready for prime time in either ext-curl or the underlying libcurl. You can still enable it explicitly by passing some positive number to the constructor.

@nicolas-grekasnicolas-grekas added this to the4.3 milestoneSep 3, 2019
@nicolas-grekasnicolas-grekas changed the base branch from4.4 to4.3September 3, 2019 12:50
@nicolas-grekasnicolas-grekasforce-pushed thehc-push branch 2 times, most recently from2d20fdd tof5b9d3aCompareSeptember 3, 2019 12:54
@nicolas-grekasnicolas-grekas changed the title[HttpClient] improve handling of HTTP/2 PUSH[HttpClient] improve handling of HTTP/2 PUSH, disable it by defaultSep 3, 2019
}
};

$client =newCurlHttpClient();
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this test be updated to opt-in for push, now that it is disabled by default ?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

sure, fixed
note that the test doesn't work, but we skip it
I prefer keeping it this way so that we are reminded about it in the future :)

if (\in_array($waitFor, ['headers','destruct'],true)) {
try {
if (\defined('CURLOPT_STREAM_WEIGHT')) {
curl_setopt($ch,CURLOPT_STREAM_WEIGHT,32);
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

this closes#32529

nicolas-grekas added a commit that referenced this pull requestSep 3, 2019
…y default (nicolas-grekas)This PR was merged into the 4.3 branch.Discussion----------[HttpClient] improve handling of HTTP/2 PUSH, disable it by default| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -This follows discussions with@dunglasFor the test cases,https://http2-push.io is down, let's use Akamai insteadThis PR now considers the proxy settings before accepting a pushed response.It also splits the responsibility of dealing with accepting pushed responses in method `acceptPushForRequest`.The logic in this method could also be delegated to a userland callback passed as an option. Let's wait for someone with an actual use case before adding the option.This PR also disables HTTP/2 PUSH by default because it is not stable: locally, with the latest curl version, enabling this on a server that pushes things fails with `Failure when receiving data from the peer`. This is not ready for prime time in either ext-curl or the underlying libcurl. You can still enable it explicitly by passing some positive number to the constructor.Commits-------019bce7 [HttpClient] improve handling of HTTP/2 PUSH
@nicolas-grekasnicolas-grekas merged commit019bce7 intosymfony:4.3Sep 3, 2019
@nicolas-grekasnicolas-grekas deleted the hc-push branchSeptember 3, 2019 19:48
nicolas-grekas added a commit that referenced this pull requestSep 3, 2019
…ndled properly (dunglas)This PR was merged into the 4.3 branch.Discussion----------[HttpClient] Fix a bug preventing Server Pushes to be handled properly| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | yes| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->| BC breaks?    | no     <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| Fixed tickets | n/a| License       | MIT| Doc PR        | n/aFollows#33444.Commits-------e1fbaeb [HttpClient] Fix a bug preventing Server Pushes to be handled properly
@Nyholm
Copy link
Member

Thank you

nicolas-grekas added a commit that referenced this pull requestSep 11, 2019
This PR was merged into the 4.3 branch.Discussion----------[HttpClient] Re-enable Server Push support| Q             | A| ------------- | ---| Branch?       | 4.3| Bug fix?      | no| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tickets       | n/a <!-- prefix each issue number with "Fix #", if any -->| License       | MIT| Doc PR        | n/a#33444 disabled Server Push support for the CURL implementation, but `HttpClient::create()` has been forgotten and override this parameter, consequently for most users Server Push wasn't disabled at all. The root issue affecting the tests are actually a misconfiguration of Akamai servers (we need our own test infrastructure).According to my testing, Server Push support works very smoothly. Also, it can cause problems only if the server actually pushes responses (which is still rare).So I propose to re-enable Push Support everywhere.Commits-------8483842 Re-enable push support for HttpClient
@fabpotfabpot mentioned this pull requestOct 7, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@stofstofstof left review comments

Assignees

No one assigned

Projects

None yet

Milestone

4.3

Development

Successfully merging this pull request may close these issues.

5 participants

@nicolas-grekas@Nyholm@fabpot@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp