public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Stefan Schantl <stefan.schantl@ipfire.org>
To: development@lists.ipfire.org
Cc: Stefan Schantl <stefan.schantl@ipfire.org>
Subject: [PATCHv2 0/7] Introduce perl LWP-based flexible downloader function
Date: Fri, 18 Apr 2025 12:54:39 +0200	[thread overview]
Message-ID: <20250418110741.7756-1-stefan.schantl@ipfire.org> (raw)

This reworked patchset contains a libwwwperl based flexible downloader
function which easily can be used to download files or grab and display any
web content.

The function now has been moved into an own perl library file
(http-client-functions.pl) in order to cleanup the general functions
library file. This should help to speed up the WUI by avoid to load to
much and big perl modules.

The FetchPublicIp function has been reworked to use the new downloader
and therefore moved to the http-client-functions file. As a result of
this, the GetDyndnsRedIP function, which is using that function also
has to be moved to the new library file and some existing CGI files needed
to be adjusted to work properly again.

The following changes from the feedback of the previously sent patchset
are also part of this patchset:

* Move the downloader into a seperate file.
* Die in case no URL has been passed to the downloader.
* Allow to specify the timeout time (default to 60sec if not set) insted of hardcode it.

-Stefan

Stefan Schantl (7):
  http-client-functions.pl: Introduce LWP-based flexible downloader
    function.
  http-client-functions.pl: Add FetchPublicIP function.
  general-functions.pl: Drop FetchPublicIp function.
  Move GetDyndnsRedIP from general-functions.pl to
    http-client-functions.pl
  ddns.cgi, wio.cgi: Use GetDyndnsRedIP from http-client-functions.pl
    file
  ids-functions.pl: Use new downloader function from
    http-client-functions.pl
  http-client-functions.pl: Allow to user define the timeout value.

 config/cfgroot/general-functions.pl     |  46 ----
 config/cfgroot/http-client-functions.pl | 345 ++++++++++++++++++++++++
 config/cfgroot/ids-functions.pl         | 206 ++------------
 config/rootfiles/common/configroot      |   1 +
 html/cgi-bin/ddns.cgi                   |   3 +-
 html/cgi-bin/wio.cgi                    |   3 +-
 lfs/configroot                          |   1 +
 7 files changed, 369 insertions(+), 236 deletions(-)
 create mode 100644 config/cfgroot/http-client-functions.pl

-- 
2.47.2



             reply	other threads:[~2025-04-18 11:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18 10:54 Stefan Schantl [this message]
2025-04-18 10:54 ` [PATCHv2 1/7] http-client-functions.pl: Introduce " Stefan Schantl
2025-04-18 10:54 ` [PATCHv2 2/7] http-client-functions.pl: Add FetchPublicIP function Stefan Schantl
2025-04-18 10:54 ` [PATCHv2 3/7] general-functions.pl: Drop FetchPublicIp function Stefan Schantl
2025-04-18 10:54 ` [PATCHv2 4/7] Move GetDyndnsRedIP from general-functions.pl to http-client-functions.pl Stefan Schantl
2025-04-18 10:54 ` [PATCHv2 5/7] ddns.cgi, wio.cgi: Use GetDyndnsRedIP from http-client-functions.pl file Stefan Schantl
2025-04-18 10:54 ` [PATCHv2 6/7] ids-functions.pl: Use new downloader function from http-client-functions.pl Stefan Schantl
2025-04-18 10:54 ` [PATCHv2 7/7] http-client-functions.pl: Allow to user define the timeout value Stefan Schantl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250418110741.7756-1-stefan.schantl@ipfire.org \
    --to=stefan.schantl@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox