Saturday, September 10, 2005

RSS, CFHTTP, UTF-8, and CFMX

This interesting problem with CFHTTP and RSS feeds encountered by Roger Benningfield a while back is going to be fixed in the Merrimack updater for ColdFusion 7.

He was having a subtle issue with CFHTTP and RSS feeds, where the XML coming back was being treated as a string sometimes and other times as binary data. CFHTTP examines to content-type to decide how to treat the result. If it's text/*, message/* or application/octet-stream, it is treated like a string. Otherwise it is treat as binary data.

cfhttp has a GetAsBinary attribute, which in CFMX7 can be yes, no, or "auto". In the updater I added a new value, "never", which will always treat the content as text. In addition I added the application/*+xml types as text as well.

I don't like the heard coded list much, but since we have the "never" mode, this puts the control back in the hands of the CFML developer, which is where we want it.

1 comment:

airshoes said...

I like your blog. Thank you. They are really great .
Some new style Puma Cat shoes is in fashion this year.
The Nike Air Shoes is a best Air Shoes .
Nike Air Rift is good and Cheap Nike Shoes.
If you are a fans of Puma basket,we would offer the good and Cheap Puma Shoes for you .the cheap ugg bootsis best christmas gift now.
The information age is really convenient .