Fun way to break attributeCollection in ColdFusion 8

Ok, so I love the new attributeCollection feature of ColdFusion 8. Here is a simple example:

<cfset s = {url="http://cnn.com", result="result"}> <cfhttp attributeCollection="#s#">

But for the heck of it, I tried something a bit crazy:

<cfset s = {url="http://cnn.com", result="result"}>

<cfset s.attributeCollection=structNew()> <cfhttp attributeCollection="#s#">

I wasn't sure what it would do. My guess is that it would apply attributeCollection as an attribute and complain that it wasn't valid. Or I thought maybe it work recursively. Well, not sure if "recursive" is right - but I thought it would apply the top level struct as attributes, then reapply the empty attributeCollection struct.

Nope - it just throws a JRun Servlet Error. So a total waste of time - but I thought I'd share.

Archived Comments

Comment 1 by Ben Nadel posted on 7/22/2007 at 8:46 PM

Trying to break stuff just for the fun of breaking it is fun :) That's how we find bugs... and sometimes, that's how we find something really cool!