Just thought I would post my own answer for the benefit of others. The 302 redirect 
was not carrying the cookies forward, so I cut it off and set the cookies manually in 
a second cfhttp call. Here's my solution:

<cfhttp throwonerror="no" redirect="no"  url="#request.GAfullpath#?#client.postinfo#" 
method="get"> 

<cfscript>
        // parse the set-cookie header to pull out the cookie values
        cookie1 = cfhttp.responseheader["set-cookie"]["1"];
        strstart = find("uid",cookie1) + 4;
        strend = find(";",cookie1,strstart);
        uid = mid(cookie1,strstart,strend-strstart);
        
        cookie2 = cfhttp.responseheader["set-cookie"]["2"];
        strstart = find("sid",cookie2) + 4;
        strend = find(";",cookie2,strstart);
        sid = mid(cookie2,strstart,strend-strstart);    
</cfscript> 
<cfhttp method="get" url="#request.GAserver##cfhttp.responseheader["LOCATION"]#" 
throwonerror="no" redirect="no">
<cfhttpparam name="getanswers/lpext.dll/uid" type="COOKIE" value="#uid#">
<cfhttpparam name="getanswers/lpext.dll/sid" type="COOKIE" value="#sid#">
</cfhttp> 

And now i get back the response I expected. 

> I am having a problem with CFHTTP as well. I am using a CFHTTP call to 
> query a knowledgebase web server on the back end of a site, but CFHTTP 
> doesn't work. What I see in the response header is that the page gets 
> a 302 re-direct, but if I allow the cfhttp call to follow the 
> re-direct it doesn't bring back the right data. I also see in the 
> first response header that the response is trying to set cookies for 
> the re-direct, and I was wondering if CFHTTP supports setting cookies 
> on a 302 re-direct. Anyone know the answer?
> 
> I have been using a COM-wrapped Java class for this work, a little 
> thing called URLFetch, but it turns out that URLFetch uses some MS 
> extensions to Java, so on Win2003 with no MS JVM on the server the 
> class doesn't work.
> 
> Any help is appreciated. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Protect your mail server with built in anti-virus protection. It's not only good for 
you, it's good for everybody.
http://www.houseoffusion.com/banners/view.cfm?bannerid=39

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182417
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to