You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #52429 [HttpClient] Replace escapeshellarg to prevent overpassing ARG_MAX (alexandre-daubois)
This PR was merged into the 6.3 branch.
Discussion
----------
[HttpClient] Replace `escapeshellarg` to prevent overpassing `ARG_MAX`
| Q | A
| ------------- | ---
| Branch? | 6.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix#49693
| License | MIT
I'm not 100% sure if it is a bugfix or a feature.
I used Nicolas' suggestion in the issue to sanitize the input and used `--data-raw` to avoid any automatic formatting.
Removing the use of `escapeshellarg()` also allows to remove `HttpClientDataCollectorTest::testItDoesNotGeneratesCurlCommandsForNotEncodableBody()`. Indeed, the body can now be encoded and will result on the following cURL command:
```
curl \\n
--compressed \\n
--request POST \\n
--url 'http://localhost:8057/json' \\n
--header 'Accept: */*' \\n
--header 'Content-Length: 1' \\n
--header 'Content-Type: application/x-www-form-urlencoded' \\n
--header 'Accept-Encoding: gzip' \\n
--header 'User-Agent: Symfony HttpClient (Native)' \\n
--data-raw '\x00'
```
Commits
-------
3b0bb11 [HttpClient] Replace `escapeshellarg` to prevent overpassing `ARG_MAX`
0 commit comments