Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Proper echoing of HTTP headers from LWP call ?

Reply
Thread Tools

Proper echoing of HTTP headers from LWP call ?

 
 
still me
Guest
Posts: n/a
 
      10-18-2007
I am pulling a web page (form) from a remote source, then echoing them
back to the caller. I use LWP for the call and then just print back
the headers as a string. I am having some issues with the headers back
in the calling browser (like the content type header not being
recognized. I am wondering if there is a perl subtlety I am missing
here that makes my approach incorrect:

my $browser = LWP::UserAgent->new;
$browser->agent("Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1;
SV1; .NET CLR 1.1.4322)");
my $url = 'https://www.example.com/someform.htm';
my $response = $browser->post( $url,[ %postParams ]);
my $allHeaders = $response->headers->as_string;
print $allHeaders;
print $response->content;

Thanks,
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
'Echoing' sound problem Steve Computer Support 10 10-04-2009 08:52 PM
Server cannot clear headers after HTTP headers have been sent Ian ASP .Net Security 2 03-20-2007 09:00 AM
Mixed SAX and DOM processing: echoing with occassional changes. michaela_google@thesilicondragon.net Java 1 04-11-2006 07:39 PM
How to Stop Modelsim from echoing tcl commands in batch mode? Dave VHDL 0 09-08-2005 08:47 AM
Echoing back to myself with Vonage? Al Puzzuoli VOIP 3 12-21-2004 05:33 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57