cgicc: Overview of the Common Gateway Interface https://www.gnu.org/software/cgicc/doc/cgi_overview.html

Overview of the Common Gateway Interface

What is the Common Gateway Interface?

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 http://hoohoo.ncsa.uiuc.edu/cgi/interface.html

CGI scripts or CGI applications?

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 script. 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 script and application are used interchangeably.

CGI Processing

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:

  1. Environment variables 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.
  2. The command line The command line is only used for isindex queries. Generally, isindex queries should not be used; since the command line is used directly, they present many potential security risks.
  3. Standard input For HTTP POST or PUT 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 CONTENT_LENGTH environment variable.
  4. Standard output 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.

GNU cgicc - A C++ class library for writing CGI applications
Copyright © 1996 - 2004 Stephen F. Booth
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.
Documentation generated Sat Jan 19 21:15:59 2008 for cgicc by doxygen 1.5.1
 
 
 

When an HTTP server receives a request for a CGI script的更多相关文章

  1. Server.MapPath和Request.PhysicalApplicationPath的异同

    很多人对它们都不陌生,在众多的WEB程序中,使用Server.MapPath和Request.PhysicalApplicationPath来操作目录/文件的几率参半,我曾经也经常混用,然而时间久了. ...

  2. [DeploymentService:290066]Error occurred while downloading files from admin server for deployment request "0". Underlying error is: "null"

    weblogic 莫名无法启动: <Apr , :: PM CST> <Error> <Deployer> <BEA-> <Failed to i ...

  3. Home Web Server 1.9.1 build 164 - CGI Remote Code Execution复现

    一.  Home Web Server 1.9.1 build 164 - CGI Remote Code Execution复现 漏洞描述: Home Web Server允许调用CGI程序来通过P ...

  4. HTTP Server to Client Communication

    1. Client browser short polling The most simple solution, client use Ajax to sends a request to the ...

  5. http2协议翻译(转)

    超文本传输协议版本 2 IETF HTTP2草案(draft-ietf-httpbis-http2-13) 摘要 本规范描述了一种优化的超文本传输协议(HTTP).HTTP/2通过引进报头字段压缩以及 ...

  6. zmq 学习笔记

    0. PUB/SUB, XPUB/XSUB filtering happens at publisher sides when sockets are using a connected protoc ...

  7. Raft

    http://thesecretlivesofdata.com/raft/ https://github.com/coreos/etcd   1 Introduction Consensus algo ...

  8. RFC 2616

    Network Working Group R. Fielding Request for Comments: 2616 UC Irvine Obsoletes: 2068 J. Gettys Cat ...

  9. MDN > Web technology for developers > HTTP

    The Hypertext Transfer Protocol (HTTP) is an application-layer protocol for transmitting hypermedia ...

随机推荐

  1. python得到今天前的七天每天日期

    import datetime d = datetime.datetime.now() def day_get(d): # 通过for 循环得到天数,如果想得到两周的时间,只需要把8改成15就可以了. ...

  2. 点滴积累【C#】---C#实现上传word以流形式保存到数据库和读取数据库中的word文件。

    本文修改来源:http://www.cnblogs.com/zmgdpg/archive/2005/03/31/129758.html 效果: 数据库: 思路: 首先保存word到数据库:获取上传文件 ...

  3. POJ 2409 Let it Bead(Polya简单应用)

    Let it Bead 大意:给你m种颜色,n个珠子串起来.旋转跟反转同样算同样,问有多少种不同的涂色组合方式. 思路:Polya的简单应用. /*************************** ...

  4. 品茗论道说广播(Broadcast内部机制讲解)(下)

    下面我们来看,递送广播动作中最重要的processNextBroadcast(). 3.2 最重要的processNextBroadcast() 从processNextBroadcast()的代码, ...

  5. thread_CountDownLatch同步计数器

    CountDownLatch类是一个同步计数器,构造时传入int参数,该参数就是计数器的初始值,每调用一次countDown()方法,计数器减1,计数器大于0 时,await()方法会阻塞程序继续执行 ...

  6. MyEclipse中背景颜色的设定

    设置代码编写区域背景色的方法: Window-->Preferences-->General-->Editors-->TextEditors-->在Appearance ...

  7. linux根据进程号PID查找启动程序的全路径

    linux根据进程号PID查找启动程序的全路径 2014-01-25 11:09 18629人阅读 评论(0) 收藏 举报  分类: Linux系统管理(29)  版权声明:本文为博主原创文章,未经博 ...

  8. iOS开发中如遇到频繁的Http请求,取消之前已经发送的Http

    主要精髓在于 第一点:不要initialize a new AFHTTPSessionManager object everytime 一定要把manager用成全局的 第二点:把请求返回的task对 ...

  9. dubbo配置约束

    此处主要记录dubbo配置的一些约束规则. 采用官网提供的原文,描述如下: 一.XML配置(官网原文) 以 timeout 为例: 方法级优先,接口级次之,全局配置再次之. 如果级别一样,则消费方优先 ...

  10. mysql information_schema 数据库简介:

    .CHARACTER_SETS 表 CREATE TEMPORARY TABLE `CHARACTER_SETS` ( `CHARACTER_SET_NAME` varchar() NOT NULL ...