Hi folks, still beginner in Perl, hope you can help me to solve this problem soon. I just try to make a get on a page which is redirected. But somehow the redirection doesn't work. The content of the respond is the following:
<HTML> <!-- File: redirectmeta.html --> <HEAD> <LINK REL="stylesheet" TYPE="text/css" HREF="/livelink_desupport/livel +ink.css"> <STYLE> .browseRow1 { background-color: #FFFFFF; } .browseRow2 { background-color: #EEEEEE; } </STYLE> <TITLE>Livelink - Umleitung</TITLE> <META HTTP-EQUIV="Refresh" CONTENT="0; URL=/livelink_de/livelink/fetch +/2000/13022444/customview.html?func=ll&amp;objId=13022444&amp;objActi +o n=browse&amp;sort=name"> </HEAD> </HTML> <!-- End File: redirectmeta.html -->
It does not matter if I use the link directly, it gives me the same result. Here is my code:
use LWP::UserAgent; use HTTP::Cookies::Netscape; $ua = LWP::UserAgent->new; $ua->agent("MyApp/0.1 "); my $cookie_jar = HTTP::Cookies::Netscape->new( file => "C:/Mozilla/Firefox/Profiles/096xdbsa.default/cookie +s.txt", autosave => 1, ); $ua->cookie_jar( $cookie_jar ); my $res = $ua->get('https://tsi-myworkroom-de.telekom.de/livelink_de +/livelink/fetch/2000/13022444/customview%2Ehtml?func=ll&objId=1302244 +4&objAction=browse&sort=name'); if ($res->is_success) { print $res->content; } else { print $res->status_line, "\n"; }
Thanks for all your help Greetings Dibucho

In reply to LWP::UserAgent, redirection does not work by dibucho

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.