Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CGI.Query variable

New Here ,
Oct 09, 2009 Oct 09, 2009

I was reviewing some older code and found the reference to a variable called "query" as in #query# . At first I thought it was a local variable since they are the usual variables to be left unscoped. But I couldn't find a place where it was defined. When I display the value it is identical to cgi.query_string.  I was puzzled as to what scope this unscoped variable was coming from.  I eventually found it appears to be cgi.query yet this is not documented anywhere that I have found.  If I cfdump CGI it doesn't list it.  But I do a cfoutput of it and it displays the same thing that cgi.query_string does.

Can someone please explain why this is not documented anywhere.  I have no idea why someone would rely on using an undocumented cgi variable unless it was commonly used  at some point in CF's past.

479
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 09, 2009 Oct 09, 2009
LATEST

You should understand that CGI variables are not created by CF, they are

created by the web server; CF is merely reporting the values exposed by the

web server. So it's not CF's job to document them. There are a number of

"standard" CGI variables that all web servers expose (this is possibly part

of the HTTP specification, I'm not sure), but there's nothing to stop the

web server exposing any other value that might be appropriate to the system

involved (like for example single-sign-on credentials).

As to why your webserver exposes this CGI.QUERY value, who knows. Have you

read the application's documentation? It might be explained there.

--

Adam

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources