Hi,

I'm attempting to connect to a cgi using the following code

my $ua = LWP::UserAgent->new(); my $method = "POST"; my $url = "http://www.lessing-photo.com/login.asp"; my $hdrs = new HTTP::Headers('Cookie' => $cookie); my $content = "ui=kevin&pw=passpass"; my $request = HTTP::Request->new($method, $url, $hdrs, $content); use HTTP::Response; my $response = $ua->request($request); print $response->content; print $response->error_as_HTML; print $response->as_string;

The response I am getting is a 100-continue in the header. Looking up to see what this is I found

The client may continue with its request. This interim response is used to inform the client that the initial part of the request has been received and has not yet been rejected by the server. The client SHOULD continue by sending the remainder of the request or, if the request has already been completed, ignore this response. The server MUST send a final response after the request has been completed.

My question is how do I make LWP continue? Right now, I recieve the 100-continue:

100 Continue HTTP/1.1 100 Continue Date: Wed, 05 Dec 2001 02:02:23 GMT Server: Microsoft-IIS/5.0 Client-Date: Wed, 05 Dec 2001 01:59:51 GMT Client-Request-Num: 1 Client-Warning: LWP HTTP/1.1 support is experimental

and my program accepts that as the response, and I get it as and error (error_as_HTML), and that's the end.

If I can get it to somehow send the "rest" of the request after recieveing this, how do I know how much the server has already recieved?

Any help would be appreciated.
Thanks,
kbeen


In reply to Handling 100-conitnue response by kbeen

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.