8000 Fixed unexpected HTTP/1.0 (closes #944) · fuzzitdev/ArduinoJson@4980ee8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4980ee8

Browse files
committed
Fixed unexpected HTTP/1.0 (closes bblanchon#944)
1 parent 2ed77d2 commit 4980ee8

File tree

1 file changed

+2
- 8000 1
lines changed

1 file changed

+2
-1
lines changed

examples/JsonHttpClient/JsonHttpClient.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ void setup() {
5959
// Check HTTP status
6060
char status[32] = {0};
6161
client.readBytesUntil('\r', status, sizeof(status));
62-
if (strcmp(status, "HTTP/1.1 200 OK") != 0) {
62+
// It should be "HTTP/1.0 200 OK" or "HTTP/1.1 200 OK"
63+
if (strcmp(status + 9, "200 OK") != 0) {
6364
Serial.print(F("Unexpected response: "));
6465
Serial.println(status);
6566
return;

0 commit comments

Comments
 (0)
0