From b614b4e67b286d80ae6ed5a8e6c717ba1953aea0 Mon Sep 17 00:00:00 2001 From: Andrea Gilardoni Date: Wed, 29 May 2024 10:16:44 +0200 Subject: [PATCH 1/2] Adding query string ind ota download --- src/Arduino_ESP32_OTA.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Arduino_ESP32_OTA.cpp b/src/Arduino_ESP32_OTA.cpp index 39dd327..040a73c 100644 --- a/src/Arduino_ESP32_OTA.cpp +++ b/src/Arduino_ESP32_OTA.cpp @@ -102,6 +102,7 @@ int Arduino_ESP32_OTA::startDownload(const char * ota_url) Error err = Error::None; int statusCode; int res; + String req; _context = new Context(ota_url, [this](uint8_t data){ _context->writtenBytes++; @@ -126,7 +127,8 @@ int Arduino_ESP32_OTA::startDownload(const char * ota_url) _http_client = new HttpClient(*_client, _context->parsed_url.host(), _context->parsed_url.port()); - res= _http_client->get(_context->parsed_url.path()); + req = String(_context->parsed_url.path()) + String(_context->parsed_url.query()); + res = _http_client->get(_context->parsed_url.path()); if(res == HTTP_ERROR_CONNECTION_FAILED) { DEBUG_VERBOSE("OTA ERROR: http client error connecting to server \"%s:%d\"", From 6b4be34662940a7b789d1cfec4ab885721965d9e Mon Sep 17 00:00:00 2001 From: Andrea Gilardoni Date: Wed, 29 May 2024 10:21:44 +0200 Subject: [PATCH 2/2] fixing download function condition exit --- src/Arduino_ESP32_OTA.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Arduino_ESP32_OTA.cpp b/src/Arduino_ESP32_OTA.cpp index 040a73c..dcc2969 100644 --- a/src/Arduino_ESP32_OTA.cpp +++ b/src/Arduino_ESP32_OTA.cpp @@ -291,7 +291,7 @@ int Arduino_ESP32_OTA::download(const char * ota_url) } int res = 0; - while((res = downloadPoll()) <= 0); + while((res = downloadPoll()) == 0); return res == 1? _context->writtenBytes : res; } pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy