rickst has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I'm trying to forward within a perl cgi script the call of my browser (an HTTP POST with cookies) to another url(but same cookies and post data from original request...).
I can fetch cookies with CGI::Simple (my %cookies = fetch CGI::Cookie;)
But im'not able to use them with LWP or WWW::Mechanize.
These modules seem to be able to import cookies from files only (or will store the cookies returned from the server and not from the browser).
Do I have to save the cookies into a file (and how, I don' t see any way of doing it with CGI::Simple) and import them into cookie_jar for LWP?
You will need to add the cookies to the HTTP::Cookies cookie jar for LWP. Very much like WWW::Mechanize does when it receives a response, you will have to mirror that behaviour within your script.