Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1658
  • Last Modified:

LWP::UserAgent

hai there,
              what to do to make persistent connection with LWP. i used keepalive header. but no use.
thank u.

-uma
0
umamaheswari
Asked:
umamaheswari
1 Solution
 
wilcoxonCommented:
The LWP keepalive should work as long as the server you are connecting to is a HTTP 1.1 server that supports keep-alive.  I personally haven't used LWP's keep-alive functionality much, but it was discussed on the mailing list a while back (you might want to check the libwww@perl.org mailing list archives).
0
 
jmcgOwnerCommented:
Nothing has happened on this question in over 7 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
accept answer by wilcoxon.

Please post any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0
 
denishoweCommented:
my $ua = LWP::UserAgent->new(keep_alive => 1);

changes the request as follows:
- The initial GET line ends with HTTP/1.1 instead of HTTP/0.9
- A header "Keep-Alive: 300" is added
- The header "Connection: Keep-Alive, TE" is sent instead of just TE.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now