Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 82bf76c75b44c3e54c5dc9d8c4b11ab5 > files > 107

cgicc-3.2.8-1mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
   "http://www.w3.org/TR/REC-html40/loose.dtd">

<html lang="en" dir="LTR">

<head>
  <!-- $Id: header.html,v 1.5 2004/06/12 01:58:25 sbooth Exp $ -->
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <title>cgicc: Overview of the Common Gateway Interface</title>
  <link rev="made" href="mailto:bug-cgicc@gnu.org" />
  <link href="doxygen.css" rel="stylesheet" type="text/css" />
  <link href="cgicc-doc.css" rel="stylesheet" type="text/css" />
</head>

<body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1><a class="anchor" name="cgi_overview">Overview of the Common Gateway Interface </a></h1> 
<div class="header">What is the Common Gateway Interface?</div>
<div class="subsection">
<p>
The Common Gateway Interface (CGI) is a standard for external gateway programs to interface with information servers, such as HTTP servers. The official specification for the Common Gateway Interface may be found at <a href="http://hoohoo.ncsa.uiuc.edu/cgi/interface.html">http://hoohoo.ncsa.uiuc.edu/cgi/interface.html</a><p>
 
</div>
<p>
 
<div class="header">CGI scripts or CGI applications?</div>
<div class="subsection">
<p>
Historically, many CGI applications were written in scripting languages such as Perl. Not surprisingly, CGI code called by the HTTP server was referred to as a CGI <em>script</em>. As the popularity of the web grew and the need for dynamic content increased, CGI applications written in languages other than Perl became more and more popular. These applications were referred to simply as scripts. Although the term script does not make intuitive sense for a compiled program, the term has stuck. In this manual, the terms <em>script</em> and <em>application</em> are used interchangeably.<p>
 
</div>
<p>
 
<div class="header">CGI Processing</div>
<div class="subsection">
<p>
When an HTTP server receives a request for a CGI script, the server communicates to the script the details of the request. The HTTP server and a CGI script communicate in four major ways:<p>
<ol>
<li>
<b>Environment variables</b> The HTTP server uses environment variables to pass information about the request to the CGI script. Depending on the type of request, the environment variables may or may not contain all the information required by the script to function properly.<p>
</li>
<li>
<b>The command line</b> The command line is only used for <code>isindex</code> queries. Generally, <code>isindex</code> queries should not be used; since the command line is used directly, they present many potential security risks.<p>
</li>
<li>
<b>Standard input</b> For HTTP <code>POST</code> or <code>PUT</code> queries, the HTTP server communicates information to the CGI script via standard input. The amount of information written to standard input is stored in the <code>CONTENT_LENGTH</code> environment variable.<p>
</li>
<li>
<b>Standard output</b> A script returns its output on standard output. The output can be a document generated by the script, or instructions to the server for retrieving the desired output. </li>
</ol>
<p>
 
</div>
<p>
 
<div class="nav">
 Previous: <a class="el" href="index.html">index</a> | Current: <a class="el" href="cgi_overview.html">Overview of the Common Gateway Interface</a> | Next: <a class="el" href="lib_overview.html">Library Overview</a>  
</div>
 </div>
<!-- $Id: footer.html,v 1.7 2004/06/12 01:58:25 sbooth Exp $ -->

<hr>

<address><small>
<a href="http://www.cgicc.org">GNU cgicc</a> - A C++ class library for
writing CGI applications<br />
Copyright &copy; 1996 - 2004 
<a href="mailto:sboothATgnuDOTorg">Stephen F. Booth</a><br />
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front Cover Texts, and with no Back-Cover
Texts.<br />
Documentation generated Tue Jun 9 15:03:49 2009 for cgicc by
<a HREF="http://www.doxygen.org/index.html">doxygen</a> 1.5.9
</small></address>

</body>

</html>