mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-05-14 17:20:15 +03:00
Fix issue #270
This commit is contained in:
parent
03723659f3
commit
c3710c8a3d
1 changed files with 1 additions and 0 deletions
|
@ -306,6 +306,7 @@ public class SpannableHelper {
|
||||||
httpsURLConnection.setRequestProperty("http.keepAlive", "false");
|
httpsURLConnection.setRequestProperty("http.keepAlive", "false");
|
||||||
httpsURLConnection.setRequestProperty("User-Agent", USER_AGENT);
|
httpsURLConnection.setRequestProperty("User-Agent", USER_AGENT);
|
||||||
httpsURLConnection.setRequestMethod("HEAD");
|
httpsURLConnection.setRequestMethod("HEAD");
|
||||||
|
httpsURLConnection.setInstanceFollowRedirects(false);
|
||||||
if (httpsURLConnection.getResponseCode() == 301 || httpsURLConnection.getResponseCode() == 302) {
|
if (httpsURLConnection.getResponseCode() == 301 || httpsURLConnection.getResponseCode() == 302) {
|
||||||
Map<String, List<String>> map = httpsURLConnection.getHeaderFields();
|
Map<String, List<String>> map = httpsURLConnection.getHeaderFields();
|
||||||
for (Map.Entry<String, List<String>> entry : map.entrySet()) {
|
for (Map.Entry<String, List<String>> entry : map.entrySet()) {
|
||||||
|
|
Loading…
Reference in a new issue