Bill thank you for the reply, I am not sure where in the library the time out is being caused, I am fairly new to working with the arduino so I'm not sure how I would go to look for that, it would appear others more talented than I have tried to fix this and failed. I am basing my guess that my issue is from a time out because of cases like this one
http://code.google.com/p/arduino/issues/detail?id=1024 that are being reported by other users.
Tim thank you for the suggestion, I tried adding in the while loop that you recommended and tested it on a basic get request for a wikipedia page here is the code that I used:
while(flag==false)//*addition from revision 2*
{
Serial.println("connecting");//addition from revision 2 this is purely for trouble shooting
if (client.connect(server, 80))
{
Serial.println("connected to server");
// Make a HTTP request:
client.println("GET /wiki/Code HTTP/1.1");//changed to wikipedia for revision 4 of code
client.println("Host:en.wikipedia.org");
client.println("Connection: close");
client.println();
flag=true;
while(client.connected()){
while (client.available()) {
char c = client.read();
Serial.write(c);
}
}
}
}
client.stop();
I also tried this:
while(flag==false)//*addition from revision 2*
{
Serial.println("connecting");//addition from revision 2 this is purely for trouble shooting
if (client.connect(server, 80))
{
Serial.println("connected to server");
// Make a HTTP request:
client.println("GET /wiki/Code HTTP/1.1");//changed to wikipedia for revision 4 of code
client.println("Host:en.wikipedia.org");
client.println("Connection: close");
client.println();
flag=true;
}
}
while(client.connected()){
while (client.available()) {
char c = client.read();
Serial.write(c);
}
}
client.stop();
With both of these after testing a few times for each I get the same result as before, the client drops the connection mid way through receiving the whole response, each time I get a different amount of the response but can never get a full request unless the response is for a very short page.