I'm writing a CGI application which acts as a very light-weight proxy to another website. It must relay (after processing) the form and cookie information it receives and return the result of the website. The other website may set new cookies, and those would have to be "translated" back so that the user receives them, but they are set for the domain of my script.
I'm using LWP to do the basic relaying, and it's no problem. I have not yet implemented the relaying of the POST information, but I am not as worried about that -- it shouldn't be so bad. My main concern is that the cookie information needs to travel back in both directions, and all the cookie handling in LWP seems to be done with cookie-jar files. This isn't going to be a good solution for me. I need to detect when a new cookie is set by the other website, and if so, translate and pass it back to the user. I also want to avoid the cooke-jar file because it's running as a CGI script.
Does anyone know of any CGI/cookie relaying tricks? I'm most interested in ways around using a cookie-jar file on the disk, and detecting new cookies.
Thanks,
blokhead
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.