in reply to HTTP Post read response , Post again

Due to this I am unable to retrive file with second post.

I think you're trying to access a protected file,
you may try something like this:

( See lwpcook )

#!/usr/bin/perl use strict; use warnings; use LWP::UserAgent; my $ua = LWP::UserAgent->new; my $req = HTTP::Request->new(GET => 'http://someip:port/'); $req->authorization_basic('Username', 'password'); print $ua->request($req)->as_string;


hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb

Replies are listed 'Best First'.
Re^2: HTTP Post read response , Post again
by perljunkie (Initiate) on Dec 19, 2008 at 15:28 UTC
    No login is no issue, because when i enter no password I receive negative response. When both userid and password correct I see login successful message sent by server.
      You can disable "TE" header sending by tweaking LWP::Protocol::http properties. Add the following to your code and TE will not sent.
      push(@LWP::Protocol::http::EXTRA_SOCK_OPTS, SendTE => 0);
      Regards,