Maybe CGI.REFERER is actually 
        variables[CGI.REFERER]

> -----Original Message-----
> From: mark brinkworth [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 15 August 2002 2:25 p.m.
> To: CF-Talk
> Subject: RE: CFMX variable issues (web protocols + dot notation in URL
> scope)
> 
> 
> There is something a little unusual about the CGI scope in 
> CFMX. Consider 
> the following piece of code, it outputs the variable 
> CGI.REFERER, which 
> while is should be CGI.HTTP_REFERER, nonetheless exists, and 
> if you click on 
> check, you will find that it is populated. However, if you do 
> a dump of CGI, 
> it is not present. This 'feature' exists for a whole pile of 
> variable names 
> in the CGI scope.
> 
> Cheers,
> Mark
> 
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> 
> <html>
> <head>
>       <title>Untitled</title>
> </head>
> 
> <body>
>       <cfoutput>
>               <a href="#cgi.script_name#">Check</a>
>               Referer=#cgi.referer#
>       </cfoutput>
>       <cfdump var="#cgi#">
> </body>
> </html>
> 
> 
> 
> >Ok, what you are seeing is a variable scope conflict. To fix 
> your issue,
> >all you need to do is change your if statement to check 
> variables.http,
> >variables.https, etc. When you just checked http, apparently 
> it checked
> >another scoped version first, and that value could not be 
> translated to
> >boolean. What's odd is that I don't see http in the cgi scope, so I'm
> >not sure where it is conflicting. I'll get back to you on this.
> >
> >=============================================================
> ==========
> >Raymond Camden, ColdFusion Jedi Master for Hire
> >
> >Email    : [EMAIL PROTECTED]
> >Yahoo IM : cfjedimaster
> >
> >"My ally is the Force, and a powerful ally it is." - Yoda
> >
> > > -----Original Message-----
> > > From: Gyrus [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, August 13, 2002 4:45 PM
> > > To: CF-Talk
> > > Subject: Re: CFMX variable issues (web protocols + dot
> > > notation in URL scope)
> > >
> > >
> > > > If you can send a test script, I can test it over here, 
> and if I can
> > > > verify it, enter a bug for you.
> > >
> > > Thanks... didn't the code come through? I don't have access
> > > to a live CFMX
> > > server. I've uploaded two test files that seem to reproduce
> > > the same error:
> > >
> > > http://www.tengai.co.uk/test/CFMX_error.zip
> > >
> > > Extract these to the same folder and browse to 
> formtest.cfm. Submit
> > > nothing - no error. Submit "http://"; - no error. Submit
> > > http://www.test.com/
> > > gives the error. Let me know if it happens for you...
> > >
> > > - Gyrus
> > >
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > > - [EMAIL PROTECTED]
> > > work: http://www.tengai.co.uk
> > > play: http://www.norlonto.net
> > > - PGP key available
> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > >
> > > >
> > > >
> > > ==============================================================
> > > =========
> > > > Raymond Camden, ColdFusion Jedi Master for Hire
> > > >
> > > > Email    : [EMAIL PROTECTED]
> > > > Yahoo IM : cfjedimaster
> > > >
> > > > "My ally is the Force, and a powerful ally it is." - Yoda
> > > >
> > > > > -----Original Message-----
> > > > > From: Gyrus [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Tuesday, August 13, 2002 3:47 PM
> > > > > To: CF-Talk
> > > > > Subject: Re: CFMX variable issues (web protocols + dot
> > > > > notation in URL scope)
> > > > >
> > > > >
> > > > > > I can't confirm this. I used this code and it worked fine.
> > > > > I think you
> > > > > > have an error elsewhere.
> > > > > >
> > > > > > <cfset fieldValue = "foo">
> > > > > > <cfscript>
> > > > > > http = Left(fieldValue, 7) EQ "http://";;
> > > > > > https = Left(fieldValue, 8) EQ "https://";;
> > > > > > ftp = Left(fieldValue, 6) EQ "ftp://";;
> > > > > > gopher = Left(fieldValue, 9) EQ "gopher://";;
> > > > > > telnet = Left(fieldValue, 9) EQ "telnet://";;
> > > > > > nntp = Left(fieldValue, 7) EQ "nntp://";;
> > > > > > wais = Left(fieldValue, 7) EQ "wais://";;
> > > > > > </cfscript>
> > > > >
> > > > > The full tag code is at the bottom. It works with form input.
> > > > >
> > > > > I think the error might be something to do with the long
> > > > > testing statement
> > > > > after the variables for the protocols are set, but it is
> > > definitely
> > > > > something to do with the variable names. I 
> consistently get the
> > > > > "coldfusion.runtime.CGIscope" error when the var names are as
> > > > > above; when I
> > > > > change them so they aren't the same as the protocols, 
> works fine.
> > > > >
> > > >
> > > >
> > > >
> > >
> >
> 
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists


Reply via email to