arduino-esp32 icon indicating copy to clipboard operation
arduino-esp32 copied to clipboard

allow HTTPClient to handle large payloads, in case the client (such as WifiClientSecure) does not

Open r-downing opened this issue 2 years ago • 1 comments

Description of Change

WiFiClient handles large write() by breaking it down and sending the whole thing in pieces, but WiFiClientSecure may just do a partial send and return the partial size, causing this to fail and return HTTPC_ERROR_SEND_PAYLOAD_FAILED

Tests scenarios

I have tested this successfully on an ESP32-S2 by posting a large jpeg file to an https server successfully.

r-downing avatar Jul 11 '22 19:07 r-downing

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jul 11 '22 19:07 CLAassistant

@r-downing thank you for your contribution! Could you please provide a simple example demonstrating the fixed and unfixed state?

PilnyTomas avatar Feb 01 '23 12:02 PilnyTomas

@r-downing thank you for your contribution! Could you please provide a simple example demonstrating the fixed and unfixed state?

I don't currently have access to the code or hardware I was working on when I encountered the issue originally, but I could try to generate a quick example if needed.

Basically in any case where you send a large payload (1000's of bytes) with HTTPClient and WifiClientSecure it will get cut off.

r-downing avatar Mar 16 '23 03:03 r-downing

if needed

Yes, please.

PilnyTomas avatar Mar 31 '23 08:03 PilnyTomas

Closing because already implemented here: https://github.com/espressif/arduino-esp32/pull/8006

me-no-dev avatar Dec 13 '23 09:12 me-no-dev