missing payload when download large file

hi, i am using w5500 to download a hex file, i am using stm32 to drive the chip, the file is around 3MB, when i send a http request, i can get the http header which tell the correct size of the file, but that is all i can get, chip will not continue to give the payload,
i can get it working using “range” in the http request to limit the packet size and download the file part by part, but result in very very slow download speed. so, where should i start to debug this problem? or it is just the limitations of the chip, unable to get packet large than the RX buffer? (I already change the socket number to two, so i can get 8k of rx buffer size)
thank you.

I’ve used a W5500 with an Adafruit Metro M4 to download files as large as 2GB, so it’s not an issue with the W5500. The W5500 automatically tells the sender the maximum number of bytes it can handle at any given time by sending a “Window size” packet. This changes dynamically based on the space available in the receive buffer. Have you implemented the HTTP multipart form data protocol on your client?

The standard for this can be found at https://tools.ietf.org/html/rfc7578#page-4, and a more user-friendly version can be found at https://stackoverflow.com/questions/4238809/example-of-multipart-form-data

Hi. I created a custom board that includes esp32 and w5500 but I couldn’t download the firmware from http and update it. Can you guide me on how to do this? I tried to use this code but failed. arduino-esp32/StreamHttpClient.ino at master · espressif/arduino-esp32 · GitHub

I upload files as an HTTP multipart/form-data POST, with other data such as the filename, version, hash, etc in separate parts.

Can you help me with your code?