![]() The server software must somehow then pass this information through to the script.Ĭonversely, upon returning, the script must provide all the information required by HTTP for a response to the request: the HTTP status of the request, the document content (if available), the document type (e.g. ![]() Accordingly, HTTP provides ways for browsers to pass such information to the server, e.g., as part of the URL. The content at the top of a Wikipedia page depends on this information. For instance, if Wikipedia were implemented as a script, one thing the script would need to know is whether the user is logged in and, if logged in, under which name. Such programs usually require some additional information to be specified with the request. In the early days of the Web, such programs were usually small and written in a scripting language hence, they were known as scripts. ![]() Conventional terminology would refer to the directory /usr/local/apache/htdocs as the server’s document root, a term not to be confused with the root directory of the filesystem hierarchy on a UNIX-like server.įor pages constructed on the fly, the server software may defer requests to separate programs and relay the results to the requesting client (usually, a Web browser that displays the page to the end user). For example, if a web server has the fully-qualified domain name and its document collection is stored at /usr/local/apache/htdocs/ in the local file system, then the web server will respond to a request for by sending to the browser a copy of the (previously-written) file /usr/local/apache/htdocs/index.html. Generally, the HTTP server has a directory (aka “folder”), which is designated as a document collection, that is, a set of files that can be sent to Web browsers connected to the server. Purpose of the CGI specification Įach Web server runs HTTP server software, which responds to requests from web browsers. The CGI program was executed by the server that provided a common "gateway" between the Web server and the legacy information system. The name CGI comes from the early days of the Web, where webmasters wanted to connect legacy information systems such as databases to their Web servers. RFC 3875 "The Common Gateway Interface (CGI)" partially defines CGI using C, in saying that environment variables "are accessed by the C library routine getenv() or variable environ". Historically CGI programs were often written using the C programming language. George Phillips (Web server maintainer at the University of British Columbia).Tony Sanders (author of the Plexus Web server).Ari Luotonen (the developer of the CERN httpd Web server).John Franks (author of the GN Web server).Rob McCool (author of the NCSA HTTPd Web server).Specifically mentioned in the RFC are the following contributors: This work resulted in RFC 3875, which specified CGI Version 1.1. In 1993, the National Center for Supercomputing Applications (NCSA) team wrote the specification for calling command line executables on the A work group chaired by Ken Coar started in November 1997 to get the NCSA definition of CGI more formally defined. ![]() ![]() History The official CGI logo from the spec announcement Due to a necessity to run CGI scripts in a separate process every time the request comes in from a client various alternatives were developed. ĭeveloped in the early 1990s, CGI was the earliest common method available that allowed a web page to be interactive. The output of the CGI script, usually in the form of HTML, is returned by the script to the Web server, and the server relays it back to the browser as its response to the browser's request. The web server then launches the CGI script in a new computer process, passing the form data to it. The form's data is sent to the web server within an HTTP request with a URL denoting a CGI script. Ī typical use case occurs when a web user submits a web form on a web page that uses CGI. Such programs are often written in a scripting language and are commonly referred to as CGI scripts, but they may include compiled programs. In computing, Common Gateway Interface ( CGI) is an interface specification that enables web servers to execute an external program to process HTTP/S user requests. For other uses, see CGI (disambiguation). This article is about the software interface between a Web server and programs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |