Fixed unexpected HTTP/1.0 (closes #944)

This commit is contained in:
Benoit Blanchon
2019-05-26 21:07:01 +02:00
parent 2ed77d2cc3
commit 4980ee8fb9

View File

@ -59,7 +59,8 @@ void setup() {
// Check HTTP status
char status[32] = {0};
client.readBytesUntil('\r', status, sizeof(status));
if (strcmp(status, "HTTP/1.1 200 OK") != 0) {
// It should be "HTTP/1.0 200 OK" or "HTTP/1.1 200 OK"
if (strcmp(status + 9, "200 OK") != 0) {
Serial.print(F("Unexpected response: "));
Serial.println(status);
return;