New release of Mozilla::PublicSuffix
Hi all, I've just released version 1.0.1 of Mozilla::Publicsuffix to CPAN. This is the first release since 2016. HTTP::CookieJar uses this module to determine which domains hosts have authority to set cookies for. Both LWP and WWW::Mechanize encourage the use of this: https://metacpan.org/pod/LWP::UserAgent#Handling-Cookies https://metacpan.org/pod/WWW::Mechanize#cookie_jar If you're using any of these things, consider upgrading to the latest version of Mozilla::PublicSuffix to benefit from four years worth of updates to the public suffix list: https://publicsuffix.org/ Tom
Re: Discouraging the use of HTTP::Cookies
On Sun, Apr 17, 2016 at 11:40:43AM -0400, Mark Gardner wrote: > Another suggestion: submit PRs to port these CPAN dists to use > HTTP::CookieJar[::LWP] instead of HTTP::Cookies: > > https://metacpan.org/requires/distribution/HTTP-Cookies Definitely! I mentioned that in my talk last November and I intend to work through some of the more popular modules listed. However, some installations might rely on the bad behaviour. We'll need to think carefully before submitting patches. Some years ago, LWP was fixed to reject invalid SSL certificates when using https. This made environments more secure, but broke various people's working code unexpectedly. But yes, if anyone (including you and me) finds a module where moving away from HTTP::Cookies makes sense, we should send a patch to make it do so. Tom
Discouraging the use of HTTP::Cookies
Hi, In November 2015 I gave a talk at London.pm about managing HTTP cookies in Perl. As a consequence, I sent a documentation patch to the HTTP::Cookies module to discourage its use: https://github.com/gisle/http-cookies/pull/7 My patch includes a test script demonstrating the module's limitations: https://github.com/gisle/http-cookies/pull/7/commits/ae00b4ed6aedc1cce72c0e8ddf5e7e8fbba417a8 Last week at London.pm's Perl Hack Day I published a Perl::Critic policy to detect code that uses HTTP::Cookies: https://metacpan.org/release/Perl-Critic-Policy-HTTPCookies I want to share this because it looks like my HTTP::Cookies patch won't get reviewed or released any time soon. I'd like to encourage readers to consider using HTTP::CookieJar or HTTP::CookieJar::LWP instead. Tom
Re: LWP hangs forever with get
On Wed, May 21, 2014 at 06:57:58PM +0200, Jesper Persson wrote: this perl code -- use LWP::Simple qw($ua get); $ua-timeout(5); $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0; $contents = get(https://www.butler.edu/boa/default.aspx;); -- just tried fresh perl installs. strawberry perl 5.16.3.1: doesnt hang. strawberry perl 5.18.0.1: doesnt hang. strawberry perl 5.18.1.1: doesnt hang. strawberry perl 5.18.2.1: hangs. strawberry perl 5.18.2.2: hangs. I expect you're using different versions of LWP with these different versions of Perl and you're encountering the change documented at https://metacpan.org/pod/LWP#PERL_LWP_SSL_VERIFY_HOSTNAME Tom
Patch: Documentation Fixes
Hi, I have attached a couple of documentation patches to update the location of LWP's git repository and provide links to related documents. Tom From dd6dccf838a9782bc5a926978e42c3b3d122874d Mon Sep 17 00:00:00 2001 From: Tom Hukins t...@eborcom.com Date: Wed, 24 Feb 2010 15:43:29 + Subject: [PATCH 1/2] Link to referenced documentation. --- lib/LWP.pm |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/LWP.pm b/lib/LWP.pm index e203d95..cb19cc7 100644 --- a/lib/LWP.pm +++ b/lib/LWP.pm @@ -554,9 +554,9 @@ The following modules provide various functions and definitions. =head1 MORE DOCUMENTATION All modules contain detailed information on the interfaces they -provide. The Ilwpcook manpage is the libwww-perl cookbook that contain +provide. The Llwpcook manpage is the libwww-perl cookbook that contain examples of typical usage of the library. You might want to take a -look at how the scripts Clwp-request, Clwp-rget and Clwp-mirror +look at how the scripts Llwp-request, Llwp-rget and Llwp-mirror are implemented. =head1 ENVIRONMENT -- 1.6.6.1 From 9d53c40389e55683603d925f02fde16fb4603e24 Mon Sep 17 00:00:00 2001 From: Tom Hukins t...@eborcom.com Date: Thu, 25 Feb 2010 08:50:04 + Subject: [PATCH 2/2] Update repository location. --- Makefile.PL |2 +- README |4 ++-- lib/LWP.pm |2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index 8855937..8f3baf2 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -58,7 +58,7 @@ WriteMakefile( 'Crypt::SSLeay' = 0, }, resources = { -repository = 'http://gitorious.org/projects/libwww-perl', +repository = 'http://github.com/gisle/libwww-perl', MailingList = 'mailto:libwww@perl.org', } }, diff --git a/README b/README index d09983a..0733b43 100644 --- a/README +++ b/README @@ -75,11 +75,11 @@ The latest version of libwww-perl is available from CPAN: If you want to hack on the source it might be a good idea to grab the latest version with git using the command: - git clone git://gitorious.org/libwww-perl/mainline.git lwp + git clone git://github.com/gisle/libwww-perl.git lwp You can also browse the git repository at: - http://gitorious.org/projects/libwww-perl + http://github.com/gisle/libwww-perl COPYRIGHT diff --git a/lib/LWP.pm b/lib/LWP.pm index cb19cc7..4383c2f 100644 --- a/lib/LWP.pm +++ b/lib/LWP.pm @@ -646,7 +646,7 @@ modify it under the same terms as Perl itself. The latest version of this library is likely to be available from CPAN as well as: - http://gitorious.org/projects/libwww-perl + http://github.com/gisle/libwww-perl The best place to discuss this code is on the libwww@perl.org mailing list. -- 1.6.6.1
Re: Problem with LWP and proxy under Cygwin
On Wed, Feb 24, 2010 at 10:28:03PM -0800, cr...@animalhead.com wrote: I'm new to this mailing list, and haven't yet found where y'all keep the good documentation about dealing with an authenticating proxy using LWP::UserAgent. In this case it's the LWP cookbook: http://search.cpan.org/~gaas/libwww-perl-5.834/lwpcook.pod#PROXIES The More Documentation at the end of LWP's POD mentions it. I have modeled a subclass approach on Gisle Aas' lwp-request. You can see the complete script at http://www.animalhead.com/maint_ip_world_db You shouldn't need to write any new classes to do this. I get a 500 internal response, as shown in the following debugger dumps: 'proxy' = HASH(0x1060eb60) empty hash This part of your dump suggests you haven't set the proxy correctly. LWP::Debug's documentation has a section about Network traffic monitoring that you might find helpful: http://search.cpan.org/~gaas/libwww-perl-5.834/lib/LWP/Debug.pm Tom
Re: Using LWP module in perl with Crypt::SSLeay
On Thu, Sep 18, 2008 at 08:22:46AM -0400, Kathalkar, Sanket wrote: I am going to use LWP module for accessing urls which are SSL enabled. Is Crypt::SSLeay required for this? The README.SSL distributed with LWP answers this: http://search.cpan.org/src/GAAS/libwww-perl-5.814/README.SSL Do I need to create a certificate to access a remote server? I've never needed to: most SSL enabled Web servers don't need client certificates. But if you're running against a server that needs an SSL certificate to authenticate you, you will need to provide that certificate somehow. Tom