Tally List : mailing list management, archiving, and analysis
click for archive home
 
Archive of:
CF-Server
Cold Fusion Server Tech
 
home
24 hour view
quick stats
weekly updates
 
all tallylists
corporate solutions
archive your favorite
help / feedback


Search the Tallylist search by keyword:

About Cold Fusion :
product's home
product's list home
 
  Archived TallyList / CF-Server: 
Subject: RE: Reading an XML file with CFHTTP
Dave Watts (48p/+0r)     Posted: Saturday 05 May 2001
This post: 51 views, +0 rating

> 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


Similar Subject Line Posts (+/- two weeks of this post)
RE: Reading an XML file with CFHTTP  07 May 2001   (48 v/ +0 r)
RE: Reading an XML file with CFHTTP  05 May 2001   (59 v/ +0 r)
RE: Reading an XML file with CFHTTP  05 May 2001 (this post)   (51 v/ +0 r)
Reading an XML file with CFHTTP  04 May 2001   (38 v/ +0 r)
 

Send a reply to the CF-Server list!
click to send a reply! NOTE: Many lists will reject your post unless you have already registered with them. Also - don't forget the right account to send from (for those with multiple emails!)

Feedback: If this post was exceptionally helpful, please help by giving this post a positive review.

 

TallyList : copyright Ububik - 2000