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:
1 parent
a1737e7842
commit
7bb251102e
1 file changed
+3
-1
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user