Closed jack-theripper closed 8 years ago
Please try this Client.php.
Problems with memory is not observed. I checked on a different file sizes.Bug fixed. I think there is an omission, there is no transfer of a body by PATCH method. I suppose necessary to replace
if (in_array($request->getMethod(), ['OPTIONS', 'POST', 'PUT'], true)) {
на
if (in_array($request->getMethod(), ['OPTIONS', 'POST', 'PUT', 'PATCH'], true)) {
Please stick to using English so that we can follow what happens. Thank you.
I think there is an omission, there is no transfer of a body by PATCH method. I suppose necessary to replace
Please, create a new issue. I'll check it.
I'm sending a request method PUT
Fatal error: Out of memory (allocated 801898496) (tried to allocate 800528777 bytes) in php-http\curl-client\src\Client.php on line 183
why CURLOPT_POSTFIELDS ?
sample code
Description PSR-7 Streams written
Attempting to represent the body of a message as a string can easily consume more memory than intended because the body must be stored completely in memory. Attempting to store the body of a request or response in memory would preclude the use of that implementation from being able to work with large message bodies.
but Client.php reading full body in variable (in memory). what to do?