Skip to content

Commit 40c2622

Browse files
bug #62315 Keep body size limit for AMP redirects (villermen)
This PR was merged into the 6.4 branch. Discussion ---------- Keep body size limit for AMP redirects | 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 Commits ------- 7f3e591 Keep body size limit for AMP redirects
2 parents b88230b + 7f3e591 commit 40c2622

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Symfony/Component/HttpClient/Response/AmpResponse.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ private static function followRedirects(Request $originRequest, AmpClientState $
329329
$request->setTcpConnectTimeout($originRequest->getTcpConnectTimeout());
330330
$request->setTlsHandshakeTimeout($originRequest->getTlsHandshakeTimeout());
331331
$request->setTransferTimeout($originRequest->getTransferTimeout());
332+
$request->setBodySizeLimit($originRequest->getBodySizeLimit());
332333

333334
if (303 === $status || \in_array($status, [301, 302], true) && 'POST' === $response->getRequest()->getMethod()) {
334335
// Do like curl and browsers: turn POST to GET on 301, 302 and 303

0 commit comments

Comments
 (0)