coldfusion cgi and cookies variables dissappear

I have a coldfusion application which prints data. I would like to access cookie and cgi variables to do some conditional login and troubleshooting. These values are there in the calling program (cgi.remote_addr or cookie.something) but are gone in the print program. I have commented out statements like:
<cfheader name="pragma" value="no-cache">
 <cfsetting showdebugoutput="no">
...but does not help. Also, the calling program is building the url to the print program dynamically
and using cfhttp to call it.

LVL 1
Neptune ITAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gurpreet Singh RandhawaCEOCommented:
where you try to call your print statement page:

use <cfdump var="#cgi#"> and <cfdump var="#cookie#">

thry with the code u commented out and try it also with code inside there too. See what is the difference u get

once done come and we will check again
0
gdemariaCommented:
cfhttp is opening a different session, so session values would not be available

Also, is your cfhttp calling a different domain?  If so, the values would not be available across domains.

How about reading these values and pass them using cfhttp parameters instead
0
C4S-DTCommented:
You simply need a wrapper.  I can't take credit for authoring the solution, but I will point you there!
Fellow CF Nutcase (and a talented one at that), Ben Nadel,  has written an elegant solution that could serve your purpose quite well.

I'll let his words explain it - but here's the link:
http://www.bennadel.com/projects/cfhttp-session.htm

Cheers!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.