comparison src/http/ngx_http_core_module.c @ 1075:4d203f76b757

undo "client_body_in_file_only any" and introduce "client_body_in_file_only clean" introduce ngx_pool_delete_file() to not break a possible third-party ngx_pool_cleanup_file() usage that may lead to an removal of the useful files delete unnecessary ngx_http_finalize_request_body()
author Igor Sysoev <igor@sysoev.ru>
date Thu, 25 Jan 2007 08:45:04 +0000
parents d82560e9d147
children db7c468c447d
comparison
equal deleted inserted replaced
1074:8164f479b362 1075:4d203f76b757
23 #define NGX_HTTP_LOCATION_REGEX 4 23 #define NGX_HTTP_LOCATION_REGEX 4
24 24
25 25
26 #define NGX_HTTP_REQUEST_BODY_FILE_OFF 0 26 #define NGX_HTTP_REQUEST_BODY_FILE_OFF 0
27 #define NGX_HTTP_REQUEST_BODY_FILE_ON 1 27 #define NGX_HTTP_REQUEST_BODY_FILE_ON 1
28 #define NGX_HTTP_REQUEST_BODY_FILE_ANY 2 28 #define NGX_HTTP_REQUEST_BODY_FILE_CLEAN 2
29 29
30 30
31 static ngx_int_t ngx_http_core_find_location(ngx_http_request_t *r, 31 static ngx_int_t ngx_http_core_find_location(ngx_http_request_t *r,
32 ngx_array_t *locations, size_t len); 32 ngx_array_t *locations, size_t len);
33 33
80 80
81 81
82 static ngx_conf_enum_t ngx_http_core_request_body_in_file[] = { 82 static ngx_conf_enum_t ngx_http_core_request_body_in_file[] = {
83 { ngx_string("off"), NGX_HTTP_REQUEST_BODY_FILE_OFF }, 83 { ngx_string("off"), NGX_HTTP_REQUEST_BODY_FILE_OFF },
84 { ngx_string("on"), NGX_HTTP_REQUEST_BODY_FILE_ON }, 84 { ngx_string("on"), NGX_HTTP_REQUEST_BODY_FILE_ON },
85 { ngx_string("any"), NGX_HTTP_REQUEST_BODY_FILE_ANY }, 85 { ngx_string("clean"), NGX_HTTP_REQUEST_BODY_FILE_CLEAN },
86 { ngx_null_string, 0 } 86 { ngx_null_string, 0 }
87 }; 87 };
88 88
89 89
90 static ngx_command_t ngx_http_core_commands[] = { 90 static ngx_command_t ngx_http_core_commands[] = {
888 } 888 }
889 889
890 if (clcf->client_body_in_file_only) { 890 if (clcf->client_body_in_file_only) {
891 r->request_body_in_file_only = 1; 891 r->request_body_in_file_only = 1;
892 r->request_body_in_persistent_file = 1; 892 r->request_body_in_persistent_file = 1;
893 r->request_body_in_clean_file =
894 clcf->client_body_in_file_only == NGX_HTTP_REQUEST_BODY_FILE_CLEAN;
893 r->request_body_file_log_level = NGX_LOG_NOTICE; 895 r->request_body_file_log_level = NGX_LOG_NOTICE;
894
895 if (clcf->client_body_in_file_only == NGX_HTTP_REQUEST_BODY_FILE_ON) {
896 r->request_body_delete_incomplete_file = 1;
897 }
898 896
899 } else { 897 } else {
900 r->request_body_file_log_level = NGX_LOG_WARN; 898 r->request_body_file_log_level = NGX_LOG_WARN;
901 } 899 }
902 900