Pete Freitag Pete Freitag

Connection Failure with Yahoo Web Services and ColdFusion

Updated on November 17, 2023
By Pete Freitag
coldfusion

If you tried using the Yahoo Web Services with CFHTTP and your cfhttp.filecontent variable had the value: Connection Failure, or if you had throwonerror="true" and you got the error: Connection Failure: Status code unavailable it is due to an encoding issue. You need to set charset="utf-8" in your CFHTTP call.

Yahoo point's out in their FAQ item: Why does ColdFusion keep giving me a "Connection Failure" message?

It's an encoding issue. You need to add <cfhttpparam type="Header" name="charset" value="utf-8" /> to your cfhttp call and it should work.

This didn't work for me when I tried it, only setting the charset attribute in CFHTTP did the trick for me. What I suspect is that in ColdFusion MX 7 setting the header with CFHTTPPARAM works, but does not in 6.1



yahoo web services cfml

Connection Failure with Yahoo Web Services and ColdFusion was first published on April 01, 2005.


Fixinator

The Fixinator Code Security Scanner for ColdFusion & CFML is an easy to use security tool that every CF developer can use. It can also easily integrate into CI for automatic scanning on every commit.


Try Fixinator

CFBreak
The weekly newsletter for the CFML Community


Comments

it took me forever to figure that one out, let me tell you!

awesome site and a great CF resource, and it's quickly become a daily for me :)
by foO on 04/07/2005 at 9:30:57 AM UTC
what is cold fusion using for web service, what's underneat-axis?
by rafael on 09/12/2006 at 11:41:28 AM UTC
Yes CF uses apache axis for web services, but I am just using http here.
by Pete Freitag on 09/12/2006 at 12:56:43 PM UTC
Hi, can someone help me in resolving Connection Failure: Status code unavailable exception when I <cfhttp> tag is called, the parameters for cfhttp tag are:
<cfhttp throwonerror="Yes" timeout="5200" resolveurl="Yes" redirect="No"
METHOD="POST"
URL="https://test123-dev.test.com/MyApp/index.cfm"
PATH="/my/data/is_here"
FILE="test1.html">
<CFHTTPPARAM type="formfield" name="fuseaction" value="reports:PrintRpts">
</cfhttp>

can someone pls explain why this code throws an exception as stated above. The other thing I have in url is https, is there special settings need to be done on server so that this exception can be stopped. Thanks in advance for your help.
by raman on 01/02/2007 at 1:15:23 PM UTC
why my yahoo messenger has bad connection it wont connected me to my yahoo messenger and is pissinssing me the help me know ok
by walter on 05/07/2007 at 3:34:53 PM UTC
I could kiss you. I've been working on this for over a week and on a whim I tried you solution and Bam. It worked. Thanks so much!!!
by sterling on 06/28/2010 at 11:13:46 PM UTC