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
When investigating #51360 I found out the HttpClientTrait::normalizeBody checks if upload streams have ended when they are nested in body (cf. #49911).
In that case, the HttpClientDataCollector will trigger an exception because it will call normalizeBody again when all streams have been read (to generate the cURL command).
MatTheCat
changed the title
[HttpClient] Upload streams check inconsistencies
[HttpClient] Uploading files causes the data collector to crash
Nov 6, 2023
…nd when files are uploaded (MatTheCat)
This PR was merged into the 6.3 branch.
Discussion
----------
[HttpClient][WebProfilerBundle] Do not generate cURL command when files are uploaded
| Q | A
| ------------- | ---
| Branch? | 6.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix#51366
| License | MIT
I also removed ``@requires` extension openssl` annotations since that does not seem to be the case since #45729.
Failures in AppVeyor occur because double quotes are missing around `--data-raw` values. Possibly related to #52429.
Commits
-------
4503f94 [HttpClient][WebProfilerBundle] Do not generate cURL command when files are uploaded
Symfony version(s) affected
≥ 6.3.0
Description
When investigating #51360 I found out the
HttpClientTrait::normalizeBody
checks if upload streams have ended when they are nested inbody
(cf. #49911).In that case, the
HttpClientDataCollector
will trigger an exception because it will callnormalizeBody
again when all streams have been read (to generate the cURL command).How to reproduce
will trigger a
TransportException
if the profiler is enabled.Possible Solution
The
HttpClientDataCollector
does not generate a cURL command when the body is a stream, so I guess it shouldn’t either in this case.The text was updated successfully, but these errors were encountered: