House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

I am having a problem with cfhttp receiving a cookie

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Hello all,
Troy Simpson
02/07/05 01:02 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Troy Simpson
02/07/2005 01:02 PM

Hello all, From a ColdFusion Application Server, I need to make an http POST request to another webserver on behalf of the client browser.  The results comes from the remote webserver in a cookie.  How can I get that cookie value? For example: <cfhttp url="https://www.website.com/bin/calc.cgi?add" port="80" method="post" resolveurl="no" useragent="MyColdFusionServer" charset="iso-8859-1" getasbinary="auto"> <cfhttpparam type="formfield" name="x" value="100" /> <cfhttpparam type="formfield" name="y" value="200" /> </cfhttp> I should get a cookie back with the value of 300, but I do not see any cookies when I use cfdump to dump the values in cfhttp.  In the cfhttp Structure, I get Charset, ErrorDetail, Filecontent, Header, Mimetype, Responseheader, Statuscode, and Text. None of these fields have the Result Cookie that I am looking for. I have found an example that is giving me the problem.  If I telnet to a webserver and get the HEAD of a document, I can two cookies listed. Here is a real life example you can try: user@localhost>telnet webapps.lib.ncsu.edu 80 Trying 152.1.79.69... Connected to appsvr.lib.ncsu.edu. Escape character is '^]'. HEAD /insidewood HTTP/1.1 Host:webapps.lib.ncsu.edu HTTP/1.1 302 Found Date: Mon, 07 Feb 2005 14:39:55 GMT Server: Apache/2.0.52 (Unix) JRun/4.0 Set-cookie: WRAP_REFERER=http://webapps.lib.ncsu.edu/insidewood; path=/; domain=.ncsu.edu Set-cookie: WRAP16=.LOGOUT+NOUSER+NOAFFIL+152.1.79.69; path=/; domain=.ncsu.edu Location: https://webauth.ncsu.edu/wrap-bin/was16.cgi?affil Content-Type: text/html; charset=iso-8859-1 Connection closed by foreign host. -------------- But if I user cfhttp, I am unable to see the two cookies listed in the Header or ResponseHeader. Any ideas? Thanks, Troy -- Troy Simpson   Applications Analyst/Programmer, OCPDBA, MCSE, SCSA North Carolina State University Libraries Campus Box 7111 | Raleigh | North Carolina ph.919.515.3855 | fax.919.513.3330 E-mail: Troy_Simpson@ncsu.edu

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Troy Simpson
02/07/2005 03:01 PM

Everyone can disregard this.  The remote webserver was redirecting cfhttp to another webpage and in the process, I was losing my COOKIES. So I had to set the redirect attribute to no and now I am getting my COOKIES. Sincerely, Troy -- Troy Simpson   Applications Analyst/Programmer, OCPDBA, MCSE, SCSA North Carolina State University Libraries Campus Box 7111 | Raleigh | North Carolina ph.919.515.3855 | fax.919.513.3330 E-mail: Troy_Simpson@ncsu.edu


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

November 23, 2014

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
             1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30             

Designer, Developer and mobile workflow conference