Skip to content

Commit b614b4e

Browse files
Adding query string ind ota download
1 parent 5ed0df5 commit b614b4e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Arduino_ESP32_OTA.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ int Arduino_ESP32_OTA::startDownload(const char * ota_url)
102102
Error err = Error::None;
103103
int statusCode;
104104
int res;
105+
String req;
105106

106107
_context = new Context(ota_url, [this](uint8_t data){
107108
_context->writtenBytes++;
@@ -126,7 +127,8 @@ int Arduino_ESP32_OTA::startDownload(const char * ota_url)
126127

127128
_http_client = new HttpClient(*_client, _context->parsed_url.host(), _context->parsed_url.port());
128129

129-
res= _http_client->get(_context->parsed_url.path());
130+
req = String(_context->parsed_url.path()) + String(_context->parsed_url.query());
131+
res = _http_client->get(_context->parsed_url.path());
130132

131133
if(res == HTTP_ERROR_CONNECTION_FAILED) {
132134
DEBUG_VERBOSE("OTA ERROR: http client error connecting to server \"%s:%d\"",

0 commit comments

Comments
 (0)