Yes, i know, but i didn't found any API that gets the headers from a page and forward them to the browser...
I'm trying to make a single sign-on script, and i need to do the following steps: 1. fetch the original login page and submit username & password 2. submit the login page and fetch from the HTTP::Headers all the cookies that i need to forward to the browser 3. forward to the browser all the cookies / cache informations / other headers and the content of the authenticated page. The problem is that i am not able to forward a full HTTP::Message to the browser, it does not work (ie: $my_HTMessage->as_string();) So, the only way i have found to forward the cookies to the browser is to get them from the $mech->(res)->_headers, and print them in stdout building my own headers followed by the authenticated content... if anyone has a better idea, please let me know... Thank you for supporting! -----Messaggio originale----- Da: Robert Barta [mailto:[EMAIL PROTECTED] Per conto di Robert Barta Inviato: giovedì 24 marzo 2005 03.49 A: Andrea Setti Cc: libwww@perl.org; 'John J Lee' Oggetto: Re: Strange HTTP::Headers behaviour in WWW::Mechanize->{res}->{_headers} hash On Tue, Mar 22, 2005 at 10:41:10AM +0100, Andrea Setti wrote: > Hi List. > > I have an issue to submit to you: > > When i loop through WWW::Mechanize->{res}->{_headers} like the > following > snippet: > > my $headers = $mech->{res}->{_headers}; while ( (my $key, my $value) = > each (%$headers)) { > print $key . ': ' . "$value\n";} > } Did you check whether there are actually API calls to do what you need to do? If I see a component _something in a hash, this usually tells me to keep my fingers off. \rho