forked from bblanchon/ArduinoJson
Fixed unexpected HTTP/1.0 (closes #944)
This commit is contained in:
@ -59,7 +59,8 @@ void setup() {
|
|||||||
// Check HTTP status
|
// Check HTTP status
|
||||||
char status[32] = {0};
|
char status[32] = {0};
|
||||||
client.readBytesUntil('\r', status, sizeof(status));
|
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.print(F("Unexpected response: "));
|
||||||
Serial.println(status);
|
Serial.println(status);
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user