mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 03:36:42 +00:00
Fix DNS lookup for `upload
`
Fix DNS lookup for ``upload`` from ota server using http regression from v12.3.1.1
This commit is contained in:
parent
3bddbdc5c0
commit
ce5e1df673
@ -25,6 +25,7 @@ All notable changes to this project will be documented in this file.
|
|||||||
- Orno WE517 modbus serial config 8E1 setting (#17545)
|
- Orno WE517 modbus serial config 8E1 setting (#17545)
|
||||||
- No IP address shown when in AP mode regression from v12.3.1.1 (#17599)
|
- No IP address shown when in AP mode regression from v12.3.1.1 (#17599)
|
||||||
- Rename ``tasmota4M.bin`` to ``tasmota-4M.bin`` to solve use of ``tasmota-minimal.bin`` (#17674)
|
- Rename ``tasmota4M.bin`` to ``tasmota-4M.bin`` to solve use of ``tasmota-minimal.bin`` (#17674)
|
||||||
|
- DNS lookup for ``upload`` from ota server using http regression from v12.3.1.1
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include <base64.h>
|
#include <base64.h>
|
||||||
|
|
||||||
#include "HttpClientLight.h"
|
#include "HttpClientLight.h"
|
||||||
|
#include "ESP8266WiFi.h"
|
||||||
|
|
||||||
#ifdef USE_WEBCLIENT_HTTPS
|
#ifdef USE_WEBCLIENT_HTTPS
|
||||||
#include "WiFiClientSecureLightBearSSL.h"
|
#include "WiFiClientSecureLightBearSSL.h"
|
||||||
@ -1158,9 +1159,21 @@ bool HTTPClientLight::connect(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if(!_client->connect(_host.c_str(), _port, _connectTimeout)) {
|
if (_protocol == "https") {
|
||||||
log_d("failed connect to %s:%u", _host.c_str(), _port);
|
if(!_client->connect(_host.c_str(), _port, _connectTimeout)) {
|
||||||
return false;
|
log_d("failed connect to %s:%u", _host.c_str(), _port);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
IPAddress remote_addr;
|
||||||
|
// Add include "ESP8266WiFi.h" for this to work
|
||||||
|
if (!WiFi.hostByName(_host.c_str(), remote_addr)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(!_client->connect(remote_addr, _port, _connectTimeout)) {
|
||||||
|
log_d("failed connect to %s:%u", _host.c_str(), _port);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set Timeout for WiFiClient and for Stream::readBytesUntil() and Stream::readStringUntil()
|
// set Timeout for WiFiClient and for Stream::readBytesUntil() and Stream::readStringUntil()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user