Guzzle 5.3: Unable to POST JSON body if larger than ~1MB

94 views
Skip to first unread message

J Cobb

unread,
Sep 1, 2015, 7:25:52 PM9/1/15
to Guzzle - PHP HTTP client and REST client framework
I'm using Guzzle 5.3 via Guzzle Services (via https://github.com/ticketevolution/ticketevolution-php) to attempt to POST to an API endpoint with a JSON body that includes a PDF encoded as base64. When the body is less than ~1MB it works fine. When the body is larger it seems that the body is never sent.

I have tested this with and without the Expect: 100 header and it does not seem to make a difference.

I have tested with Transfer-Encoding: chunked, but because the API needs the entire POST body in order to authenticate using chunked does not work.

We have tested with and without the load balance between the client and the appservers.

From everything we can tell the body just doesn't get sent when it is larger than ~1MB.

Does anyone have any ideas on how to get Guzzle 5.3 to send the body even when it is larger than 1MB?

Below is the log output

[2015-09-01 16:15:43] TEvoAPIClientLogger.CRITICAL:
>>>>>>>>
POST
/v9/orders/2100732/deliver_etickets HTTP/1.1
Host: api.ticketevolution.com
User-Agent: ticketevolution-php/3.0.0dev Guzzle/5.3.0 curl/7.44.0 PHP/5.5.28
Content-Type: application/json
Content-Length: 1387036
X
-Token: b47dsd8c0ab80a1e2bc24sc341415a2f
X
-Signature: SwBOkdUOqG3SDtjVwi2etosdP+gppwuV5dCq8yMw9lM=  


{"etickets":[{"item_id":1513651,"eticket":"JVBERi0xLjQKJeLjz9MKNCAwIG9iaiBbXQplb… [a whole lot of base64 snipped] …NwolJUVPRgo="}]}
<<<<<<<<  --------
cURL error
52: Empty reply from server

Reply all
Reply to author
Forward
0 new messages