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

Convert LWP::Simple to http_download function calls #125

Closed
virtualmin opened this issue Mar 15, 2015 · 12 comments
Closed

Convert LWP::Simple to http_download function calls #125

virtualmin opened this issue Mar 15, 2015 · 12 comments

Comments

@virtualmin
Copy link

The dependency on LWP::Simple is causing some folks problems; if it's missing the page indefinitely hangs with the spinner.

There is no need for an external dependency for making simple web requests, as the Webmin library already has a relatively simple function for downloading a remote file.

http://doxfer.webmin.com/Webmin/API_Webmin-Core#http_download.28host.2C_port.2C_page.2C_destfile.2C_.5B.26error.5D.2C_.5B.26callback.5D.2C_.5Bsslmode.5D.2C_.5Buser.2C_pass.5D.2C_.5Btimeout.5D.2C_.5Bosdn-convert.5D.2C_.5Bno-cache.5D.2C_.5B.26headers.5D.29

I see only three instances of this library being needed, all in sysinfo.cgi. You can also kill a couple of lines of code by using the Webmin function (normally using popular CPAN libraries is good Perl practice, but Webmin has a very strong desire to require as few external dependencies as possible, especially for functionality that already exists in the standard Webmin library).

@iliajie
Copy link
Collaborator

iliajie commented Mar 17, 2015

Alright, Joe. All dependencies are going to _be removed_ in version 10.30. Theme will only wish for Net::SSLeay to make updates work (as they only can be access by https connection made to GitHub) but theme will never fail with error message again. Webmin also requires Net::SSLeay to establish https connections by the way, so it should be installed anyway.

@iliajie iliajie closed this as completed Mar 17, 2015
@jcameron
Copy link
Collaborator

Regarding updates, does the theme have the ability to download updates to itself separately from Webmin's regular update process?

@iliajie
Copy link
Collaborator

iliajie commented Mar 17, 2015

No, theme when update is ready shows the notice and if user clicks update it will update itself by Webmin means, meaning Webmin->Webmin Configuration->Themes.

@iliajie
Copy link
Collaborator

iliajie commented Mar 17, 2015

On the local version, change version number in VERSION.txt to see how it works. If you disable the spinner you will see what is happening. After update is clicked by a user, JavaScrit inserts a link to Theme module, and clicks download and install. New version, 10.30, will have an option to disable notification updates completely.

I understand your concern.

@rvanlaak
Copy link

Would it be possible to force an update? We do not have Net::SSLeay installed, so that means updates do not work at the moment.

@iliajie
Copy link
Collaborator

iliajie commented Mar 26, 2015

You can always update manually. You need SSL simply because you can't make non https request to GitHub. For the future, automatic updates will not work at all (without Net::SSLeay), just as much you will not be able to access Webmin using https without this Perl module. There is not a single reason not to have it installed, right? Can you install it?

@rvanlaak
Copy link

After installing Net::SSLeay the updates still do not work. Any place where I can debug it? A 'force update' link / url would be nice 👍

@iliajie
Copy link
Collaborator

iliajie commented Mar 26, 2015

What version you're on?

@iliajie
Copy link
Collaborator

iliajie commented Mar 26, 2015

I mean theme version?

@iliajie
Copy link
Collaborator

iliajie commented Mar 26, 2015

Try refreshing System Information.

@rvanlaak
Copy link

Theme version is Authentic Theme 10.1.2

@iliajie
Copy link
Collaborator

iliajie commented Mar 27, 2015

You need more dependencies for this version. Version 11 is out and it's only needs Net::SSLeay. Update manually this time.

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

3 participants