From b3b2ccf908f4c379d31a6147f0292c2c3405896e Mon Sep 17 00:00:00 2001 From: sasodoma Date: Sun, 9 Aug 2020 19:25:15 +0200 Subject: [PATCH 1/2] Add a missing slash in bin file URI Given that the URL in line 53 contains the same words "server" and "file.bin", one might assume that in line 55, the slash after the port number would get added automatically, however I have found out that without a slash you get an invalid request. Adding the slash removes any doubt. --- libraries/HTTPUpdate/examples/httpUpdate/httpUpdate.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/HTTPUpdate/examples/httpUpdate/httpUpdate.ino b/libraries/HTTPUpdate/examples/httpUpdate/httpUpdate.ino index f646be04583..e98a5851366 100644 --- a/libraries/HTTPUpdate/examples/httpUpdate/httpUpdate.ino +++ b/libraries/HTTPUpdate/examples/httpUpdate/httpUpdate.ino @@ -52,7 +52,7 @@ void loop() { t_httpUpdate_return ret = httpUpdate.update(client, "http://server/file.bin"); // Or: - //t_httpUpdate_return ret = httpUpdate.update(client, "server", 80, "file.bin"); + //t_httpUpdate_return ret = httpUpdate.update(client, "server", 80, "/file.bin"); switch (ret) { case HTTP_UPDATE_FAILED: From 01ddd5be4f3abf57e25c5a63d7826cdb1b85549d Mon Sep 17 00:00:00 2001 From: sasodoma Date: Sun, 9 Aug 2020 19:25:59 +0200 Subject: [PATCH 2/2] Add a missing slash in bin file URI Given that the URL in line 109 contains the same words "server" and "file.bin", one might assume that in line 111, the slash after the port number would get added automatically, however I have found out that without a slash you get an invalid request. Adding the slash removes any doubt. --- .../HTTPUpdate/examples/httpUpdateSecure/httpUpdateSecure.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/HTTPUpdate/examples/httpUpdateSecure/httpUpdateSecure.ino b/libraries/HTTPUpdate/examples/httpUpdateSecure/httpUpdateSecure.ino index 5daa2a4f2a1..1c85ace02a5 100644 --- a/libraries/HTTPUpdate/examples/httpUpdateSecure/httpUpdateSecure.ino +++ b/libraries/HTTPUpdate/examples/httpUpdateSecure/httpUpdateSecure.ino @@ -108,7 +108,7 @@ void loop() { t_httpUpdate_return ret = httpUpdate.update(client, "https://server/file.bin"); // Or: - //t_httpUpdate_return ret = httpUpdate.update(client, "server", 443, "file.bin"); + //t_httpUpdate_return ret = httpUpdate.update(client, "server", 443, "/file.bin"); switch (ret) {