The following script is an attempt to automate the remote administration of my website using LWP. It attempts to submit the fields 'email' and 'passwd.'
# Jonathan S. Mark jonathansamuel@yahoo.com # Program to log on to Alxnet use strict; use LWP; use HTTP::Request::Common; use constant ALX_ENTER => 'http://www.alxnet.com/controlcenter/'; use constant ALX_REFERER => 'http://www.alxnet.com'; my $ua = LWP::UserAgent->new; my $newagent = 'enter_alxnet/1.0 (' . $ua->agent . ')'; #identifies ap +p to net. Not important. $ua->agent($newagent); my $request = POST (ALX_ENTER, Content => [email => 'jonathansamuel@ya +hoo.com', passwd => 'subforactualvalue', t => 'alxnet_signup'], Refer +er => ALX_REFERER); my $response = $ua->request($request)->as_string; print $response;

Unfortunately, running this LWP script returns a message from the server similar to the following:

HTTP/1.1 302 Found Cache-Control: no-cache, must-revalidate Connection: close Date: Sun, 12 Aug 2001 10:31:11 GMT Pragma: no-cache Location: /controlcenter/?u=100000&p=0x1000000000000 Server: Apache/1.3.17 (Unix) PHP/4.0.4pl1 mod_perl/1.25 Content-Type: text/html Expires: Mon, 26 Jul 1990 05:00:00 GMT Last-Modified: Sun, 12 Aug 2001 10:31:13GMT Client-Date: Sun, 12 Aug 2001 11:38:28 GMT Client-Peer: 209.92.32.185:80

Can anyone clue me in what is going on here. What does 'no-cache, must revalidate' mean? What do I have to do using LWP to avoid this problem?


In reply to Posting Form with LWP Produces 'no-cache, must revalidate' Error by sierrathedog04

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.