There have been a number of posts about the problems with the CFHTTP tag, specifically 
regarding the inability to send cookies with an HTTP "GET".

Due to simplistic text nature of the HTTP protocol, there's a workaround. Since the 
way to send Cookies in a GET is by simply sending another line of text in the message 
to the server, this can simply be added to one of the other HTTP headers that is 
supported by the CFHTTP command. For example, add a <CR><LF> plus the Cookies to the 
end of the User-Agent tag. By <CR><LF>, I mean the ASCII characters for a line break, 
which are done in CF using "chr(13)" and "chr(10)". The following is an example of how 
to make this work:

<CFHTTP URL="http://www.server.com"; METHOD="GET" 
USERAGENT="Mozilla/4.0#chr(13)##chr(10)#Cookie: myCookie=1; anotherCookie=2">

The HTTP protocol specifies that the format for sending cookies is as shown above, 
with multiple cookies separated by semicolon characters (;).

While I agree that CFHTTP still has other problems, this workaround may help you to 
resolve one of it's issues. By the way, we used a similar solution for some 
limitations with CFMAIL a few versions back, so this technique works for many of the 
simple Internet protocols.

Of course, other alternatives include the use of external components instead of using 
CFHTTP, especially in CF MX.

Anthony Wenzel
Dominion Digital, Inc.
http://www.dominiondigital.com


______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to