Downloading files > 20kb doesn't work UPDATE: it must be WiFi issue...

johnwasser:
Do you check for client.available() before reading a byte? If not, you may be reading faster than the server can send.

The read is within a while client.available loop.