cgi 规范
以下给出一些例子:
假如我有一个请求发送给html转换器。当转换器完成它的工作的时候,它将输出以下的内容到stdout中。
--- start of output ---
content-type: text/html
--- end of output ---
这里注意有一个空白行在content-type之后。
再给出另外一个例子,假如我有一个脚本,可以从这个服务器中返回文档/path/doc.txt,就象用户已经请求了http://server:port/path/doc.txt,脚本的输出为:
--- start of output ---
location: /path/doc.txt
--- end of output ---
服务器件将执行这个请求并且将它发送给客户端。
另外,还有一个脚本可以引用我们的gopher服务器。如果脚本想为用户提供gopher://gopher.ncsa.uiuc.edu/,它的输出为:
--- start of output ---
location: gopher://gopher.ncsa.uiuc.edu/
--- end of output ---
最后,如果有一个脚本可以直接通知客户器。比如如果脚本是用http/1.0的server_protocol 来引用的,这个脚本就将输出以下的http/1.0响应:
--- start of output ---
http/1.0 200 ok
server: ncsa/1.0a6
content-type: text/plain
--- end of output ---
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器