I had a similar issue a while ago where I discovered I could access system environment variables (CGI.systemroot, for instance) when using apache.
I believe what it is is that CF 'knows' it gets certain CGI vars, which it puts in the CGI struct. If you ask for something CF doesn't explicitly know about, it will query the web server for that variable, and the web server will return an empty string no matter what you pass it - try dumping 'cgi.foo'. StructKeyExists() works as you expect because its acting on CF's 'known cgi vars' struct keys, and no evaluation of the variable is performed. IsDefined() always returns true because it evaluates the expression and the web server sends the empty string back to CF, which then is (correctly, imo), "defined." (as an empty string) Hope that helps, Kam Btw thanks Barney for the original explanation :) -----Original Message----- From: Claude Schneegans [mailto:[EMAIL PROTECTED] Sent: Monday, November 14, 2005 8:40 AM To: CF-Talk Subject: Re: Is this a bug,... or an undocumented feature? >>I suppose what's hapening is that there is no way to ask the HTTP server if some variable is defined or not. No, this is not what's hapening, since the structKeyExists function seems to work well. Also, CFDUMP on cgi scope lists all of them, so CF manages to get the list of all existing cgi variables, whatever they are as defined by the server so the function isDefined() should answer correctly. So, it IS a flaw, if not a bug. -- _______________________________________ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224091 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

