I read your code. I tried client.write(char*) compared to client.print(F(char*)) and found that the write uses less SRAM than the print. See the server thread. This part belongs there. I have been "thread hopping" (wish the Arduino could thread hop!).
Thanks for that!