On Thu, Mar 24, 2005 at 09:31:08AM +0100, Andrea Setti wrote: > 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.
If it is only the cookie stuff then reading man lwpcook may help. Remember, that WWW::Mechanize subclasses LWP. Otherwise I am not sure what headers WHICH THE SERVER sends. you should put into a message WHICH then THE CLIENT SENDS. There are not too many occasions where you would do that... \rho > -----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 >