No such thing as a small change | |
PerlMonks |
What part of the software stack might cause the timeout on LWP::UserAgent via HTTPS to fail with some perls on Linux and Windows?by milu (Initiate) |
on Feb 28, 2012 at 00:12 UTC ( [id://956556]=perlquestion: print w/replies, xml ) | Need Help?? |
milu has asked for the wisdom of the Perl Monks concerning the following question:
I posted the full details over at StackOverflow.com, but the available wisdom wasn't sufficient to answer the question, so I'm reposting it here. Or rather, I'm pointing to the original question, sort of advertising it, so here goes:
Make timeout work for LWP::UserAgent HTTPS Bottom line is: ActivePerl on Windows and Liux as well as Cygwin perl (on Windows, of course) appear to have problems. How would I go about even starting to find an issue such as this, which might be in Perl or any of the used libraries? (And probably not in the Perl code used in LWP and so on.) Thanks! UpdateSo here's a copy and paste of my question on StackOverflow.com: Relevance: It is annoying to see your HTTPS client block indefinitely because the connection endpoint is unreliable. This experiment is easy to set up and replay at home. You just need two things, a tarpit to trap an incoming client, and a Perl script. The tarpit can be set up using `netcat`: Then, point the script to this tarpit: What is this going to do? Well, connect to the port opened by NetCat, and then ... hang. Indefinitely. At least in terms of developer time. I mean it might time out after ten minutes or two hours, but I haven't checked; the specified timeout doesn't take effect, not on Linux, and not on Windows (Win32, haven't checked Cygwin). Versions used: Now for the `timeout` and `Timeout` parameters. The former is the name of the parameter for LWP::UA(https://metacpan.org/module/LWP::UserAgent), the latter is the name for IO::Socket::SSL(https://metacpan.org/module/IO::Socket::SSL), used via LWP::Protocol::https(https://metacpan.org/module/LWP::Protocol::https). (Incidentally, why is metacpan HTTPS? Well, at least it's not a tarpit.) I am somehow hoping to have these parameters passed along :) Just so you know, `keep_alive` doesn't have anything to do with the timeout not working, I verified that empirically. :) Anyway, before digging deeper, does anyone know what's going on here and how to make the timeout work with HTTPS? Hard to believe I'm the first person running into this.
Back to
Seekers of Perl Wisdom
|
|