免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1484 | 回复: 0
打印 上一主题 下一主题

Apache API note(2) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-10-22 11:55 |只看该作者 |倒序浏览

似乎这个blog对于发表文章的字数有限制。当文章比较长时,会出现 the Document no data的错误信息。也许是溢出了吧。
下面是继续Apache API note的未完部分。
How handlers work
The sole argument to handlers is a request_rec structure. This
structure describes a particular request which has been made to the
server, on behalf of a client. In most cases, each connection to the
client generates only one request_rec structure.
句柄是如何工作的 。
句柄中最核心的参数是一个request_rec的结构。这个结构描述了一个由客户端已经发送发送到服务端的具体请求。在大多数情况下,每个来自客户端的连接只产生一个request_rec结构。
A brief tour of the request_rec
request_rec结构的简要介绍
The request_rec contains pointers to a resource pool which will be
cleared when the server is finished handling the request; to structures
containing per-server and per-connection information, and most
importantly, information on the request itself.
request_rec包括指向一个资源库的一些指针,这个资源库会在服务程序处理完请求后被清理。这个结构包含了每服务器和每连接的信息,最重要的是,包括这个请求本身的信息。
The most important such information is a small set of character strings
describing attributes of the object being requested, including its URI,
filename, content-type and content-encoding (these being filled in by
the translation and type-check handlers which handle the request,
respectively).
这些信息中最重要的是一个小的字符串的集合,他们描述了被请求对象的属性,包括它的URI,文件名,内容类型和内容编码(它们在处理请求时,被分别填入翻译和类型检查句柄)。
Other commonly used data items are tables giving the MIME headers on
the client's original request, MIME headers to be sent back with the
ppppresponse (which modules can add to at will), and environment
variables for any subprocesses which are spawned off in the course of
servicing the request. These tables are manipulated using the table_get
and table_set routines.
客户端原始请求中其它常用的数据元素,加入MIME头后,做成表格状,MIME头会随着pppresponse(这个模块可以被加入而生效)被返回,并且
环境变量任何子进程的环境变量,在服务端处理请求的过程中被激发。这些表格可以使用table_get和table_set例程来处理。


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/474/showart_3288.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP