Due + WiFi web client drops connections prematurely?

I'm running into a strange issue with my Due board with WiFi shield. I'm wondering if this is a known problem or if there might be a workaround.

I have an Arduino WiFi R3 shield (with firmware updated about 6 weeks ago) plugged into a Due (R3) board and am using it as a web client to send REST requests to my server. Some of the requests take a long time to process on the server, so the response may not come back for times up to several minutes after the request. The problem is that the Due seems to drop the TCP connection after seemingly random amounts of time, often before the server responds. Sometimes it works, successfully waiting minutes for a response, and sometimes it simply disconnects after waiting only a few seconds. Here's what my code is doing (where "client" is an instance of WiFiClient):

client.connect(host, port);
// ... write request bytes...
client.write(...);

while (!client.available()) {
    if (!client.connected()) {
        Serial.println("disconnected");
        return -1;
    }
    delay(10);
}
//... read and process response.

It appears that it's only the TCP connection that is being dropped and not the connection to my WiFi network as I can immediately turn around and re-send the request.

The weird thing is that this code consistently works perfectly on Mega2560 and Uno R3 boards. Only the Due is giving me trouble. Any suggestions for what might be going wrong or how to make the Due more reliable?

EDIT: I should also point out that Due + Ethernet shield seems to work correctly. It's only Due + WiFi that is having the problem.

Thanks in advance for any help.