Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of application after a permanent redirect #241

Open
WPCleaner opened this issue Jul 8, 2020 · 2 comments
Open

Update of application after a permanent redirect #241

WPCleaner opened this issue Jul 8, 2020 · 2 comments

Comments

@WPCleaner
Copy link

WPCleaner commented Jul 8, 2020

Hi.
The hosting I'm using for my application just did a domain migration. Old URL are now returning a 308 (Permanent Redirect).
getdown, instead of following the Permanent Redirect replaced digest.txt and digest2.txt with the following HTML:

<html>
<head><title>308 Permanent Redirect</title></head>
<body bgcolor="white">
<center><h1>308 Permanent Redirect</h1></center>
<hr><center>nginx/1.14.2</center>
</body>
</html>

All installations are now failing to update properly.

2020/07/08 19:57:09:911 INFOS n$a.a: ------------------ VM Info ------------------
2020/07/08 19:57:09:912 INFOS n$a.a: -- OS Name: Windows 10
2020/07/08 19:57:09:912 INFOS n$a.a: -- OS Arch: amd64
2020/07/08 19:57:09:913 INFOS n$a.a: -- OS Vers: 10.0
2020/07/08 19:57:09:913 INFOS n$a.a: -- Java Vers: 1.8.0_251
2020/07/08 19:57:09:913 INFOS n$a.a: -- Java Home: C:\Program Files\Java\jre1.8.0_251
2020/07/08 19:57:09:913 INFOS n$a.a: -- User Name: Nicolas
2020/07/08 19:57:09:913 INFOS n$a.a: -- User Home: C:\Users\Nicolas
2020/07/08 19:57:09:913 INFOS n$a.a: -- Cur dir: C:\Users\Nicolas\Donnees\Outils\WPCleaner\WPCleaner-test - Copie
2020/07/08 19:57:09:913 INFOS n$a.a: ---------------------------------------------
2020/07/08 19:57:09:989 INFOS n$a.a: Failed to find proxy settings in Windows registry [error=java.lang.UnsatisfiedLinkError: no jRegistryKey in java.library.path]
2020/07/08 19:57:09:991 INFOS n$a.a: ---------------- Proxy Info -----------------
2020/07/08 19:57:09:991 INFOS n$a.a: -- Proxy Host: null
2020/07/08 19:57:09:991 INFOS n$a.a: -- Proxy Port: null
2020/07/08 19:57:09:991 INFOS n$a.a: ---------------------------------------------
2020/07/08 19:57:10:001 INFOS n$a.a: Able to lock for updates: true
2020/07/08 19:57:10:003 INFOS n$a.a: Checking Java version [current=1080251, wantMin=1070000, wantMax=0]
2020/07/08 19:57:10:028 INFOS n$a.a: Verifying application: https://tools.wmflabs.org/wpcleaner/wpcleaner-test/
2020/07/08 19:57:10:028 INFOS n$a.a: Version: -1
2020/07/08 19:57:10:028 INFOS n$a.a: Class: org.wikipediacleaner.WikipediaCleaner
2020/07/08 19:57:10:029 INFOS n$a.a: Dropping status 'm.validating'.
2020/07/08 19:57:10:044 INFOS n$a.a: Attempting to refetch 'digest.txt' from 'https://tools.wmflabs.org/wpcleaner/wpcleaner-test/digest.txt'.
2020/07/08 19:57:10:097 AVERTISSEMENT n$a.a: Failed to load image [path=.\commons-nuvola-web-broom-64px.png, error=javax.imageio.IIOException: Can't read input file!]
2020/07/08 19:57:10:097 AVERTISSEMENT n$a.a: Error loading icon image [path=commons-nuvola-web-broom-64px.png]
2020/07/08 19:57:10:097 AVERTISSEMENT n$a.a: Failed to load image [path=.\commons-nuvola-web-broom.png, error=javax.imageio.IIOException: Can't read input file!]
2020/07/08 19:57:10:097 AVERTISSEMENT n$a.a: Error loading icon image [path=commons-nuvola-web-broom.png]
2020/07/08 19:57:10:097 AVERTISSEMENT n$a.a: Failed to load any icons [iconImages=[commons-nuvola-web-broom-64px.png, commons-nuvola-web-broom.png]]
2020/07/08 19:57:11:575 INFOS n$a.a: No signers, not verifying file [path=digest.txt]
2020/07/08 19:57:11:587 INFOS n$a.a: Attempting to refetch 'digest2.txt' from 'https://tools.wmflabs.org/wpcleaner/wpcleaner-test/digest2.txt'.
2020/07/08 19:57:11:669 INFOS n$a.a: No signers, not verifying file [path=digest2.txt]
2020/07/08 19:57:11:669 AVERTISSEMENT n$a.a: Failed to refresh non-versioned digest: m.invalid_digest_file|~|~4bd5111ce98a7115046b1edded6cd05b8d87e6d9a7faad060226fad6d79059cb. Proceeding...
2020/07/08 19:57:11:699 INFOS n$a.a: Verified resources [count=35, size=7406k, duration=15ms]
2020/07/08 19:57:11:699 INFOS n$a.a: Installing 0 downloaded resources:
2020/07/08 19:57:11:699 INFOS n$a.a: Install completed.
2020/07/08 19:57:11:699 INFOS n$a.a: Didn't find any custom environment variables, not setting any.
2020/07/08 19:57:11:699 INFOS n$a.a: Running C:\Program Files\Java\jre1.8.0_251\bin\javaw.exe

@bekoenig
Copy link
Contributor

bekoenig commented Aug 10, 2024

Hi @WPCleaner,

this is an old issue, which I analyse for further works.

It seems, that this is a problem which is related to a bug in the jdk. Follow redirects for status code 308 is unsupported in HttpURLConnection. Unfortunately Connector doesn't check the status code and downloads the error page.

Workaround: Try to use status code 301 with location in header.

This issue is one argument more to switch communication to apache http client.

Greetings
@bekoenig

@WPCleaner
Copy link
Author

Hi @bekoenig

It's an old thread, so I'm not sure I remember how it went...
I think I convinced the people managing the hosting to change the redirect for some time, so that users could update the application with a new base URL

Feel free to close this issue if you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants