Connection Failure with Yahoo Web Services and 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
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
I tried this method but to no avail. I still get the "Connection Failure" error.
Here is my code
<cfhttp url="http://mail.yahoo.com/" method="get" redirect="Yes" resolveurl="Yes">
<cfhttpparam type="Header" name="charset" value="utf-8" />
<cffile action="WRITE" file="c:\inetpub\wwwroot\new.html" output="#cfhttp.FileContent#" addnewline="Yes" nameconflict="OVERWRITE">
<cflocation url="new.html" addtoken="No">
<cfhttpparam type="header" name="accept-encoding" value="no-compression"/>
Any help will be appericated.
- Updating Java on ColdFusion or Lucee
- ColdFusion returning empty response with server-error: true
- Careful applying CF11u16, CF2016u8, CF2018u2
- Sessions don't work in Chrome but do in IE
- csrfVerifyToken does not invalidate the token
- The cf_sql_ is optional in cfqueryparam
- Cookie Expires / Max-Age 1969-12-31T23:59:59.000Z
- Burst Throttling on AWS API Gateway Explained