分享

HTTP模块(二)

 thy 2009-07-24

client_header_timeout

syntax: client_header_timeout time

default: client_header_timeout 60

context: http, server

Directive assigns timeout with reading of the title of the request of client.

The timeout is set only if a header is not get in one readstep. If after this time the client send nothing, nginx returns error "Request time out" (408).

client_max_body_size

syntax: client_max_body_size size

default: client_max_body_size 1m

context: http, server, location

Directive assigns the maximum accepted body size of client request, indicated by the line "Content-Length" in the header of request. 可接受的客户端最大request body,也就是http request头部中的content-length字段指定的值

If size is greater the given one, then the client gets the error "Request Entity Too Large" (413). content-length大于给定的这个值,就会返回Request Entity Too Large 错误

It is necessary to keep in mind that the browsers do not know how to correctly show this error.一定要记住浏览器是不知道如何正确的显示错误的,所以一定要使用error_page指定显示错误页面??

Default_type

语法:default_type MIME-type

缺省值:default_type text/plain

Context:http,server,location

当标准的MIMEmap没有指定任何东西时,指定默认的MIME-type

e.g.

location = /proxy.pac {
      default_type application/x-ns-proxy-autoconfig;
}
location = /wpad.dat {
      rewrite . /proxy.pac;
      default_type application/x-ns-proxy-autoconfig;
}

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多