Only follow HTTP redirects on ESP8266

ESP32 doesn't have the redirect following capability, don't try and turn it on.
This commit is contained in:
Earle F. Philhower, III authored and GitHub committed 2020-07-29 07:48:27 -07:00
1 parent a1737e7842
commit 7bb251102e
1 file changed
+3 -1
+3 -1
View File
@@ -38,8 +38,10 @@ bool AudioFileSourceHTTPStream::open(const char *url)
{
pos = 0;
http.begin(client, url);
http.setFollowRedirects(true);
http.setReuse(true);
#ifndef ESP32
http.setFollowRedirects(true);
#endif
int code = http.GET();
if (code != HTTP_CODE_OK) {
http.end();