I tried using Socket/HTTP:NET/LWP etc with no success. Below is my example code.POST http://someip:port/ HTTP/1.1 User-Agent: Perlprogram/0.1 Host: someip:port Accept: application/text Content-Type: application/text Content-Length: xxx UserID: Username, Password: password HTTP/1.1 200 OK Date: Mon, 15 Dec 2008 20:49:26 CST Cache-Control: no-store Content-Type: application/text Content-Length: xxx Login Successful POST http://someip:port/ HTTP/1.1 User-Agent: Perlprogram/0.1 Host: someip:port Accept: application/text Content-Type: application/text Content-Length: xxx Send some conf file HTTP/1.1 200 OK Date: Mon, 15 Dec 2008 20:49:27 CST Cache-Control: no-store Content-Type: application/text Content-Length: xxx Here it is........
I tried to insert another post code in or run them in different get post .pl files yield no help. Because server sees connection closed due to post close response.#!/usr/bin/perl -w use strict; use LWP::UserAgent; use HTTP::Request::Common; my $message; my $userAgent = LWP::UserAgent->new(agent => 'Perlprogram/0.1'); $message = "UserID: Username, Password: password"; my $response = $userAgent->request(POST 'http://someip:port/', Content_Type => 'application/text', Connection => 'Keep-alive', Content => $message); if ($response->is_success) { print $response->content; } else { print $response->status_line, "\n"; }
I see something like above in the wireshark which means my connection is TE,Close by some reason. So after webserver's response my connection and login becomes invalid. Due to this I am unable to retrive file with second post. Second observation I made was in the TCP header my sequence number starts with 1 instead of continuation. E.g.: my client program should say Next Sequence number will be: 343 and it should go to that sequence number and send post message so that webserver can reply. Any help will be appreciated.POST / HTTP/1.1 TE: deflate,gzip;q=0.3 Connection: Keep-alive, TE, close Host: someip:port User-Agent: Perlprogram/0.1 Content-Length: xxx Content-Type: application/text
In reply to HTTP Post read response , Post again by perljunkie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |