When an HTTP server receives a request for a CGI script
cgicc: Overview of the Common Gateway Interface https://www.gnu.org/software/cgicc/doc/cgi_overview.html
Overview of 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
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.
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:
- 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.
- The command line The command line is only used for
isindexqueries. Generally,isindexqueries should not be used; since the command line is used directly, they present many potential security risks. - Standard input For HTTP
POSTorPUTqueries, the HTTP server communicates information to the CGI script via standard input. The amount of information written to standard input is stored in theCONTENT_LENGTHenvironment variable. - 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的更多相关文章
- Server.MapPath和Request.PhysicalApplicationPath的异同
很多人对它们都不陌生,在众多的WEB程序中,使用Server.MapPath和Request.PhysicalApplicationPath来操作目录/文件的几率参半,我曾经也经常混用,然而时间久了. ...
- [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 ...
- 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 ...
- HTTP Server to Client Communication
1. Client browser short polling The most simple solution, client use Ajax to sends a request to the ...
- http2协议翻译(转)
超文本传输协议版本 2 IETF HTTP2草案(draft-ietf-httpbis-http2-13) 摘要 本规范描述了一种优化的超文本传输协议(HTTP).HTTP/2通过引进报头字段压缩以及 ...
- zmq 学习笔记
0. PUB/SUB, XPUB/XSUB filtering happens at publisher sides when sockets are using a connected protoc ...
- Raft
http://thesecretlivesofdata.com/raft/ https://github.com/coreos/etcd 1 Introduction Consensus algo ...
- RFC 2616
Network Working Group R. Fielding Request for Comments: 2616 UC Irvine Obsoletes: 2068 J. Gettys Cat ...
- MDN > Web technology for developers > HTTP
The Hypertext Transfer Protocol (HTTP) is an application-layer protocol for transmitting hypermedia ...
随机推荐
- BAT特殊字符(转)
BAT特殊字符1. 点 与echo连用,作用是换行 示例1 [输出空行] echo. 2 > 定向符[输出] 将命令的输出进行重定向 [一般用于将结果写入文件] 注意 nul 为空设备 > ...
- 使用 ConfigurationSection 创建自定义配置节
我们可以通过用自己的 XML 配置元素来扩展标准的 ASP.NET 配置设置集,要完成这一功能,我们必须实现继承System.Configuration.ConfigurationSection 类来 ...
- 分布式系统的CAP和BASE理论
1. 背景 网络分区:俗称“脑裂”.当网络发生异常情况,导致分布式系统中部分节点之间的网络延时不断变大,最终导致组成分布式系统的所有节点中,只有部分节点之间能够进行正常通信,而另一些节点则不能. 当网 ...
- cacheManager载入问题
net.sf.ehcache.CacheException: Another unnamed CacheManager already exists in the same VM. Please pr ...
- C#遍历计算机上所有的文件
class Program { static List<string> allFileName=new List<string>(); static void Main(str ...
- poj 1806 Frequent values(RMQ 统计次数) 详细讲解
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1806 题目大意:给你一个非降序排列的整数数组,你的任务是对于一系列的询问,(i,j),回答序列中出现次 ...
- 如何用手机访问电脑上的html文件
如何用手机访问电脑上的html文件 梦唪 | 浏览 3876 次 推荐于2016-03-26 08:08:58 最佳答案 1,你得搭建服务器,用Apache或者IIS.2,把HTML文件放到服 ...
- shell 实现mysql写入操作
mysql -uroot study -proot << EOF > insert into top_n_movie(movie,sumprice)values('hello kit ...
- ubuntu12.10更新源
ubuntu12.10更新源 2013-03-10 20:48:17| 分类: Linux |字号 订阅 不同的网络状况连接以下源的速度不同, 建议在添加前手动验证以下源的连接速度(ping下就 ...
- 使用Fiddler调试线上JS代码
在下面的命令框输入“select script”回车来筛选js请求 将HTTP请求重定向到本地的文件,进行web调试.这种调试方式不需要发布到线上再验证,避免了修改不成功.对用户造成影响的风险 左边一 ...