8000 Keep body size limit for AMP redirects by villermen · Pull Request #62315 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@villermen
Copy link
Contributor
@villermen villermen commented Nov 5, 2025
Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #62314
License MIT

Copies over body size limit when following redirects in AmpHttpClient. See #62314

@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has a contribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.4 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbot carsonbot changed the title Keep body size limit for AMP redirects Keep body size limit for AMP redirects Nov 5, 2025
@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "7.3" but it seems your PR description refers to branch "7.3 for bug fixes".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@stof
Copy link
Member
stof commented Nov 5, 2025

The fix looks good to me, but we need to apply it in the 6.4 branch as that branch already disables the body size limit.

@villermen villermen force-pushed the amp-fix-body-size-limit-on-redirect branch from 5909b16 to 7f3e591 Compare November 5, 2025 17:15
@villermen villermen changed the base branch from 7.3 to 6.4 November 5, 2025 17:15
@villermen
Copy link
Contributor Author

@stof Thanks for the pointer. I changed the base to 6.4 now. Note that this version still included just the one version of AmpResponse. Should I open a second PR to apply it to the split AmpResponseV4 and AmpResponseV5 in 7.3 as well?

@stof
Copy link
Member
stof commented Nov 5, 2025

yes please.

Edit: might not be worth it depending on how the merge-up will go.

@nicolas-grekas
Copy link
Member

Thank you @villermen.

@nicolas-grekas nicolas-grekas merged commit 40c2622 into symfony:6.4 Nov 5, 2025
$request->setTcpConnectTimeout($originRequest->getTcpConnectTimeout());
$request->setTlsHandshakeTimeout($originRequest->getTlsHandshakeTimeout());
$request->setTransferTimeout($originRequest->getTransferTimeout());
$request->setBodySizeLimit($originRequest->getBodySizeLimit());
Copy link
Member

Choose a reason for hiding this comment

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

FTR I changed it this way after merging:

-            $request->setBodySizeLimit($originRequest->getBodySizeLimit());
+            $request->setBodySizeLimit(0);
+            if (method_exists($request, 'setInactivityTimeout')) {
+                $request->setInactivityTimeout(0);
+            }

@nicolas-grekas
Copy link
Member

Now merged into 7.3

This was referenced Nov 6, 2025
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

0