> I am trying to render an XML file but first I need to read it > using CFHTTP. While trying to do so, CFHTTP returns the following: > > "The requested file is not ASCII text and can not be rendered." > > The problem is that I cannot do anything with the variable returned by > CFHTTP, because it contains the specific text that I mentioned above.
With certain versions of CF, if you retrieve content from a remote server, but that server doesn't explicitly label it as a text MIME type, you won't be able to reference it with CFHTTP.FileContent. There are two solutions:
1. Upgrade to a later version. I believe this was fixed in CF 4.5.1 SP2.
2. Instead of simply referencing CFHTTP.FileContent, use CFHTTP to write it to a file, then use CFFILE to read that file and work with it as needed.
If you don't want to use either of those solutions, you can use a third-party HTTP component, if you like.
Finally, you'll want to make sure that you're actually returning what you think you should be getting - you can use method 2 to check this.
Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm ------------------------------------------------------------------------------ To unsubscribe, send a message to cf-server-request@houseoffusion.com with 'unsubscribe' in the body or visit the list page at www.houseoffusion.com