Skip to content

Commit 601766f

Browse files
Merge pull request #86 from lukbieli/master
Added support for following http redirects 302 and 301
2 parents 270da98 + d849b1f commit 601766f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/esp32fota.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ void esp32FOTA::execOTA()
181181
HTTPClient http;
182182
WiFiClientSecure client;
183183
//http.setConnectTimeout( 1000 );
184+
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
184185

185186
log_i("Connecting to: %s\r\n", _firmwareUrl.c_str() );
186187
if( _firmwareUrl.substring( 0, 5 ) == "https" ) {
@@ -395,6 +396,7 @@ bool esp32FOTA::execHTTPcheck()
395396

396397
HTTPClient http;
397398
WiFiClientSecure client;
399+
http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS);
398400

399401
if( useURL.substring( 0, 5 ) == "https" ) {
400402
if (!_allow_insecure_https) {

0 commit comments

Comments
 (0)