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. cocos2dx 3.x Node::schedule

    auto callback = [=](float dt){ //do something }; node->schedule(callback, 1.0/60, "mySchedul ...

  2. 点滴积累【JS】---JS小功能(操作Table--动态添加删除表格及数据)

    效果: 代码: <head runat="server"> <title></title> <style type="text/ ...

  3. 使用jquery dialog

    网页开发中,弹窗还是很有必要的.本人比较喜欢jquery ui的dialog. 但是jquery dialog中也有一些略显不方便的,如:没有z-index的参数设置,脚部的按钮样式没办法自定义…… ...

  4. tensolrflow之基础变量

    #优化一个乘法算子 #coding:utf- __author__ = 'similarface' import tensorflow as tf sess=tf.Session() #创建一个常量张 ...

  5. vue的单文件组件

    五. 单文件组件 1. .vue文件 .vue文件,称为单文件组件,是Vue.js自定义的一种文件格式,一个.vue文件就是一个单独的组件,在文件内封装了组件相关的代码:html.css.js .vu ...

  6. javascript断点设置和调试

    JS调试必备的5个debug技巧http://www.jb51.net/article/47812.htm Chrome 中的 JavaScript 断点设置和调试技巧http://www.xuebu ...

  7. Windows调试神器:WinDBG

    Q:WinDBG的Watch窗口中我想要查看长字符串,但是后面的内容都被省略为...了怎么办? A:如图,双击你要查看的内容,出现光标后,移动光标即可查看后面被省略的内容 Q:WinDBG如何给程序设 ...

  8. root-me web server 10-20 writeup

    File upload - double extensions文件上传--双扩展 Gallery v0.02 介绍 Your goal is to hack this photo galery by ...

  9. cocos2dx触摸

    两种方法其实都一样,CCLayer也是继承CCTouchDelegate. 1.继承CCTouchDelegate 添加触摸代理 CCTouchDispatcher* pDispatcher = CC ...

  10. va_list中的_vsntprintf使用介绍

    相信大家都用过sprintf这个函数,就是下面这样: int sprintf( char *buffer, const char *format [, argument] ... ); 在之前看到了用 ...