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

Added body size limit option to AmpHttpClient#58873

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

Closed
Kinqdos wants to merge3 commits intosymfony:7.2fromKinqdos:7.2

Conversation

Kinqdos
Copy link

QA
Branch7.2
Bug fix?no
New feature?no
Deprecations?no
IssuesBody size limit always capped at ~10 MB with AmpHttpClient
LicenseMIT

I added the optionbody_size_limit to the AmpHttpClient to be able to increase the default from AmpHttpClient, wich is ~10 MB.

linusrush and VoigtK reacted with thumbs up emojilinusrush reacted with rocket emoji
@carsonbotcarsonbot added this to the7.2 milestoneNov 14, 2024
@carsonbot
Copy link

Hey!

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

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.2 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

@Kinqdos
Copy link
Author

Failing tests are in completely different components. My code doesn't affect those components.

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

I'd rather always callsetBodySizeLimit(0) to remove any limits, since the other clients don't have one anyway. Can you please update accordingly?

@nicolas-grekas
Copy link
Member

Oh, and I'd be fine fixing this on branch 5.4 as a bugfix.

@KinqdosKinqdos changed the base branch from7.2 to5.4November 14, 2024 14:21
@Kinqdos
Copy link
Author

Oh, and I'd be fine fixing this on branch 5.4 as a bugfix.

Are you sure I can change this pull request? Or should I create a new one?

@KinqdosKinqdos changed the base branch from5.4 to7.2November 14, 2024 14:23
nicolas-grekas added a commit that referenced this pull requestNov 14, 2024
This PR was merged into the 5.4 branch.Discussion----------[HttpClient] Removed body size limit| Q             | A| ------------- | ---| Branch       | 5.4| Bug fix      | yes| New feature  | no <!-- please update src/**/CHANGELOG.md files -->| Deprecations | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Issues        | Fixes Body size limit of ~10 MB in AmpHttpClient| License       | MITSee#58873<!--Replace this notice by a description of your feature/bugfix.This will help reviewers and should be a good start for the documentation.Additionally (seehttps://symfony.com/releases): - Always add tests and ensure they pass. - Bug fixes must be submitted against the lowest maintained branch where they apply   (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the latest branch. - For new features, provide some code snippets to help understand usage. - Changelog entry should followhttps://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (seehttps://symfony.com/bc).-->Commits-------122a480 Removed body size limit
@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 .
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

nuncanada commentedDec 23, 2024
edited
Loading

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',    ],];

@nicolas-grekas
Copy link
Member

Try upgrading amphp/http-client and its dependencies

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@lyrixxlyrixxAwaiting requested review from lyrixx

@ycerutoycerutoAwaiting requested review from yceruto

@chalasrchalasrAwaiting requested review from chalasr

@dunglasdunglasAwaiting requested review from dunglas

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees
No one assigned
Projects
None yet
Milestone
7.2
Development

Successfully merging this pull request may close these issues.

4 participants
@Kinqdos@carsonbot@nicolas-grekas@nuncanada

[8]ページ先頭

©2009-2025 Movatter.jp