[HttpClient][WebProfilerBundle] Catch errors when encoding body for c…#46570
Conversation
|
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
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! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
|
Hey! I think @Deuchnord has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
03cc221 to
36e6fa0
Compare
|
Thank you @pl-github. |
In Symfony 6.1 a button to copy a request as a cURL command was introduced for the profiler.
But if I post a binary file containing null characters using the curl-http-client the
HttpClientDataCollectorthrows an error.My solution is to catch the
ValueErrorin this situation and to returnnullas the resulting curl command. Returningnullseems to be the standard handling for unexpectad values in this data collector.