?
Solved

LWP::UserAgent

Posted on 2003-03-07
4
Medium Priority
?
1,648 Views
Last Modified: 2012-08-14
hai there,
              what to do to make persistent connection with LWP. i used keepalive header. but no use.
thank u.

-uma
0
Comment
Question by:umamaheswari
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 26

Accepted Solution

by:
wilcoxon earned 80 total points
ID: 8096234
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
 
LVL 20

Expert Comment

by:jmcg
ID: 9697598
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
 

Expert Comment

by:denishowe
ID: 23931672
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question