Hello,
I’m currently using Plug
to handle POST
requests sent by libcurl
with a JSON body. Now libcurl
breaks POST
requests into multiple HTTP requests with the Expect: 100-Continue
header after the body exceeds a certain size (right now the body is 3kb, I expect it to continue growing during development of the project). What then happens is that Plug.Parser
throws an error from Poison
that the input has ended abruptly (Unexpected end of input at position 2047
) which is true.
After some initial research I have discovered that Cowboy
has supported such HTTP requests since v0.6.1 (I’m using 1.0) and even explicitly disabling such a header in libcurl
does not stop it from splitting the request into multiple requests.
So to my question, is there someway in Plug
to have the parser wait until Cowboy
stitches the requests together before attempting to parse it? Or is there some other way in which I could somehow assemble the requests together then pass it to Poison
manually?