Bugzilla – Bug 1818
add sanity check version check
Last modified: 2008-12-15 13:06:52 UTC
checkVersionCB does accept any non zero value from the update check and displays it on home.html. Under certain circumstances this can be anything but a regular link to the update (see eg. http://forums. slimdevices.com/showthread.php?p=44358). A simple sanity check should be added to prevent output of wrong contents.
Created attachment 635 [details] check for correct download URL
Don't do that. It means that the web site organization is hard coded in some versions of slimserver. Instead, we should check for an error from the HTTP request and not display content, just a warning message: There was a problem checking for a SlimServer update. (Error code 407) Patches anyone?
That's why I started the thread about SimpleAsyncHTTP and what's throwing errors. It's in there that http responses could/should be checked. In case of a 40x or 50x it should imho not call the success callback.
Created attachment 637 [details] check http error code A slightly more intelligent sanity check.
Closer. That string needs to be in the strings.txt file so it can be localized. Also, let's catch any non-200 error (if it's sending back garbage, it may not be 4xx or 5xx, or if it can't connect at all...)
I'll try Robert's code: > Try wrapping the setting and chomping of $::newVersion in this: > if ($http->{'code'} ~= /^2\d\d/) { ... } What about 3xx errors?
Created attachment 640 [details] only accept status code 2xx/3xx Added l10n as well. But the server's answer is english only - and this seems more important to me than a string that gets lost in the log file ;-)
Committed change 3716.
This bug appears to have been fixed in the latest release! If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look. Make sure to include the version number of the software you are seeing the error with.