PUT Body empty when sending lots of data in the Body

72 views
Skip to first unread message

Robert Nelson

unread,
Jun 17, 2015, 2:47:32 PM6/17/15
to guz...@googlegroups.com
We use Guzzle quite successfully, but we came across an issue when using PUT.
I have PUT request which sends the body successfully to a REST service (PHP based). 
However, when the BODY of the PUT request is a certain size or greater, the BODY on at the REST service appears empty.
I have verified that the body stays intact until the moment of transfer.
Is this an issue with Guzzle or maybe a php config issue?

Robert Nelson

unread,
Jun 17, 2015, 5:07:47 PM6/17/15
to guz...@googlegroups.com
Upon further inspection, ti looks like the receiving service is dropping the body at a certain size threshold. Ignore this question.

Robert Nelson

unread,
Jun 18, 2015, 12:48:18 PM6/18/15
to guz...@googlegroups.com
Upon further FURTHER inspection. The request coming from guzzle seems to be removing the body and marking the CONTENT_TYPE as null.
I'm digging into it further. I have since changed this particular call to POST instead of PUT, and still no change.

Robert Nelson

unread,
Jun 18, 2015, 2:04:06 PM6/18/15
to guz...@googlegroups.com
Turns out we are using an older version of GuzzleHttp. There is a size limit when it turns the body from a string to a stream:

if (($size !== null && $size < 32768)

There was not great way to override this, so we just changed it to what the latest version of GuzzleHttp has.
Reply all
Reply to author
Forward
0 new messages