comparison src/http/ngx_http_core_module.c @ 186:54aabf2b0bc6 NGINX_0_3_40

nginx 0.3.40 *) Feature: the ngx_http_dav_module supports the MKCOL method. *) Feature: the "create_full_put_path" directive. *) Feature: the "$limit_rate" variable.
author Igor Sysoev <http://sysoev.ru>
date Wed, 19 Apr 2006 00:00:00 +0400
parents 71ff1e2b484a
children 3689cd4e3228
comparison
equal deleted inserted replaced
185:a9c5dc369ffe 186:54aabf2b0bc6
751 } 751 }
752 752
753 if (clcf->client_body_in_file_only) { 753 if (clcf->client_body_in_file_only) {
754 r->request_body_in_file_only = 1; 754 r->request_body_in_file_only = 1;
755 r->request_body_in_persistent_file = 1; 755 r->request_body_in_persistent_file = 1;
756 r->request_body_file_log_level = NGX_LOG_NOTICE;
757
758 } else {
759 r->request_body_file_log_level = NGX_LOG_WARN;
756 } 760 }
757 761
758 if (r->keepalive && clcf->keepalive_timeout == 0) { 762 if (r->keepalive && clcf->keepalive_timeout == 0) {
759 r->keepalive = 0; 763 r->keepalive = 0;
760 } 764 }
1690 1694
1691 1695
1692 static char * 1696 static char *
1693 ngx_http_core_types(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) 1697 ngx_http_core_types(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
1694 { 1698 {
1699 ngx_http_core_loc_conf_t *lcf = conf;
1700
1695 char *rv; 1701 char *rv;
1696 ngx_conf_t save; 1702 ngx_conf_t save;
1697
1698 save = *cf;
1699 cf->handler = ngx_http_core_type;
1700 cf->handler_conf = conf;
1701
1702 rv = ngx_conf_parse(cf, NULL);
1703
1704 *cf = save;
1705
1706 return rv;
1707 }
1708
1709
1710 static char *
1711 ngx_http_core_type(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
1712 {
1713 ngx_http_core_loc_conf_t *lcf = conf;
1714
1715 ngx_str_t *value, *content_type, *old;
1716 ngx_uint_t i, n;
1717 ngx_hash_key_t *type;
1718 1703
1719 if (lcf->types == NULL) { 1704 if (lcf->types == NULL) {
1720 lcf->types = ngx_array_create(cf->pool, 64, sizeof(ngx_hash_key_t)); 1705 lcf->types = ngx_array_create(cf->pool, 64, sizeof(ngx_hash_key_t));
1721 if (lcf->types == NULL) { 1706 if (lcf->types == NULL) {
1722 return NGX_CONF_ERROR; 1707 return NGX_CONF_ERROR;
1723 } 1708 }
1724 } 1709 }
1710
1711 save = *cf;
1712 cf->handler = ngx_http_core_type;
1713 cf->handler_conf = conf;
1714
1715 rv = ngx_conf_parse(cf, NULL);
1716
1717 *cf = save;
1718
1719 return rv;
1720 }
1721
1722
1723 static char *
1724 ngx_http_core_type(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
1725 {
1726 ngx_http_core_loc_conf_t *lcf = conf;
1727
1728 ngx_str_t *value, *content_type, *old;
1729 ngx_uint_t i, n;
1730 ngx_hash_key_t *type;
1725 1731
1726 content_type = ngx_palloc(cf->pool, sizeof(ngx_str_t)); 1732 content_type = ngx_palloc(cf->pool, sizeof(ngx_str_t));
1727 if (content_type == NULL) { 1733 if (content_type == NULL) {
1728 return NGX_CONF_ERROR; 1734 return NGX_CONF_ERROR;
1729 } 1735 }