kbeen has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Handling 100-conitnue response
by cacharbe (Curate) on Dec 05, 2001 at 08:30 UTC |