I used the picow_http_client
and picow_http_verify
examples as the starting point for application which needs to download a relatively large file from a webserver - specifically about 500 kB.
But, each time, the download falls short, it halts a few hundred bytes over 16,000 (and still under 16384).
I checked and confirmed that I can replicate the same truncation behaviour with unchanged example code from the repo (with the exception of changing file to be downloaded to point to a larger one, also on the RPI server) viz:
#define URL_REQUEST "/os_list_imagingutility_v3.json"
Which is 43k in size.
I see truncation and the tests failing using both http
and https
transfers and and also on pico_w
and pico2_w
boards.
Looking at a Wireshark trace (attached) I can see that LwIP is reporting TCP Window FULL
around the time things to grind to a halt.
I've commented out the payload printing and just report the cumulative lengths but that's not made any difference.
So, I'm wondering if there's a bug in the http methods provided in LwIP.