[thelist] Advanced CFHTTP Question

.jeff jeff at members.evolt.org
Wed Jul 17 00:28:01 CDT 2002


josh,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Josh
>
> You are right Jeff, the session is being maintained by
> cookies.  I have tried viewing the cookies on my machine
> and passing them as parameters.  It did not work.  Have
> you ever tried it? Have you ever gotten it to work
> successfully or are you just assuming?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

i've successfully passed cookies to an application.  you'll need to use the
<cfhttpparam> tag combined with setting the method to post to get it to
work.

when the response returns from the other server you should get a structure
named cfhttp back.  depending on the version of coldfusion server you're
running (i think) you should have two keys with all the info you need --
header and responseheader.  if you only have the header key you'll have to
parse it manually for the cookie info.  if you the responseheader key
exists, it will be a structure containing a number of other keys --
connection, content-type, date, explanation, http_version,
page-completion-status (which is an array), server, status_code, and if
cookies were set, set-cookie which will be an array of cookies that were
sent which you'll need to parse for the name and value of each out of each
set-cookie string.

once you've got the name/value pairs parsed out for the cookies that are
used to identify the session you should be able to use the <cfhttpparam>
tags in your next cfhttp call to keep the session alive.

good luck,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/





More information about the thelist mailing list