Skip to content

[HttpClient] Removed body size limit #58875

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 14, 2024
Merged

Conversation

Kinqdos
Copy link

@Kinqdos Kinqdos commented Nov 14, 2024

Q A
Branch 5.4
Bug fix yes
New feature no
Deprecations no
Issues Fixes Body size limit of ~10 MB in AmpHttpClient
License MIT

See #58873

@carsonbot carsonbot added this to the 5.4 milestone Nov 14, 2024
@symfony symfony deleted a comment from carsonbot Nov 14, 2024
@carsonbot carsonbot changed the title Removed body size limit [HttpClient] Removed body size limit Nov 14, 2024
@nicolas-grekas
Copy link
Member

Thank you @Kinqdos.

@nicolas-grekas nicolas-grekas merged commit 0d7717b into symfony:5.4 Nov 14, 2024
10 of 12 checks passed
@nuncanada
Copy link
Contributor

This seems to cause Body Size problems with importmap:install !

PS C:\Users\flaviobb\Desktop\ProjetosContratos-pncp\contratos_symfony> composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run composer update or composer update <package name>.
Nothing to install, update or remove
Package league/uri-parser is abandoned, you should avoid using it. Use league/uri-interfaces instead.
Generating autoload files
129 packages you are using are looking for funding.
Use the composer fund command to find out more!

Run composer recipes at any time to see the status of your Symfony recipes.

Executing script cache:clear [OK]
Executing script importmap:install [KO]
[KO]
Script importmap:install returned with error code 1
!! 0/21 >--------------------------- https://cdn.jsdelivr.net/npm/jquery-ui@1.13.2/+esm
!! In ErrorChunk.php line 73:
!!
!! Body size limit exceeded
!!
!!
!! In Http2ConnectionProcessor.php line 711:
!!
!! Body size limit exceeded
!!
!!
!! In Http2ConnectionProcessor.php line 757:
!!
!! Body size limit exceeded
!!
!!
!! importmap:install
!!
!!
Script @auto-scripts was called via post-install-cmd

Once I changed that line from
$request->setBodySizeLimit(0);
To
$request->setBodySizeLimit(10000000000000000);

Everything worked just fine!!!

@nuncanada
Copy link
Contributor

My importmap.php:

<?php

/**
 * Returns the importmap for this application.
 *
 * - "path" is a path inside the asset mapper system. Use the
 *     "debug:asset-map" command to see the full list of paths.
 *
 * - "entrypoint" (JavaScript only) set to true for any module that will
 *     be used as an "entrypoint" (and passed to the importmap() Twig function).
 *
 * The "importmap:require" command can be used to add new entries to this file.
 */
return [
    'jquery-ui' => [
        'version' => '1.13.2',
    ],
    'jquery' => [
        'version' => '3.7.1',
    ],
    'jquery/dist/jquery.min.js' => [
        'version' => '3.7.1',
    ],
    'bootbox' => [
        'version' => '6.0.0',
    ],
    'ckeditor' => [
        'version' => '4.12.1',
    ],
    '@fortawesome/fontawesome-free' => [
        'version' => '6.5.2',
    ],
    '@fortawesome/fontawesome-free/css/fontawesome.min.css' => [
        'version' => '6.5.2',
        'type' => 'css',
    ],
    '@fortawesome/fontawesome-svg-core' => [
        'version' => '6.5.2',
    ],
    '@fortawesome/fontawesome-svg-core/styles.min.css' => [
        'version' => '6.5.2',
        'type' => 'css',
    ],
    '@fortawesome/free-brands-svg-icons' => [
        'version' => '6.5.2',
    ],
    '@fortawesome/free-regular-svg-icons' => [
        'version' => '6.5.2',
    ],
    '@fortawesome/free-solid-svg-icons' => [
        'version' => '6.5.2',
    ],
    'bootstrap' => [
        'version' => '5.3.3',
    ],
    '@popperjs/core' => [
        'version' => '2.11.8',
    ],
    'bootstrap/dist/css/bootstrap.min.css' => [
        'version' => '5.3.3',
        'type' => 'css',
    ],
    'bootstrap5-autocomplete' => [
        'version' => '1.1.26',
    ],
    'bootstrap5-autocomplete/autocomplete.js' => [
        'version' => '1.1.26',
    ],
    
    'app' => [
        'path' => './assets/app.js',
        'entrypoint' => true,
    ],
    '@hotwired/stimulus' => [
        'version' => '3.2.2',
    ],
    'tom-select' => [
        'version' => '2.3.1',
    ],
    'tom-select/dist/css/tom-select.default.css' => [
        'version' => '2.3.1',
        'type' => 'css',
    ],
    'tom-select/dist/css/tom-select.bootstrap5.css' => [
        'version' => '2.3.1',
        'type' => 'css',
    ],
    '@stm/admin-bundle' => [
        'path' => './vendor/stm/admin-bundle/assets/StmAdmin.js',
    ],
];

@OskarStark
Copy link
Contributor

Please create a new issue, thank you

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.

5 participants