Mercurial > hg > nginx
comparison src/http/modules/ngx_http_static_module.c @ 773:c3ebeee31026
remove r->root_length
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 12 Oct 2006 13:36:54 +0000 |
parents | fd8a64f5dd3b |
children | c4f666fc3a7e |
comparison
equal
deleted
inserted
replaced
772:843412b22ba2 | 773:c3ebeee31026 |
---|---|
71 | 71 |
72 static ngx_int_t | 72 static ngx_int_t |
73 ngx_http_static_handler(ngx_http_request_t *r) | 73 ngx_http_static_handler(ngx_http_request_t *r) |
74 { | 74 { |
75 u_char *last, *location; | 75 u_char *last, *location; |
76 size_t root; | |
76 ngx_fd_t fd; | 77 ngx_fd_t fd; |
77 ngx_int_t rc; | 78 ngx_int_t rc; |
78 ngx_uint_t level; | 79 ngx_uint_t level; |
79 ngx_str_t path; | 80 ngx_str_t path; |
80 ngx_err_t err; | 81 ngx_err_t err; |
110 /* | 111 /* |
111 * ngx_http_map_uri_to_path() allocates memory for terminating '\0' | 112 * ngx_http_map_uri_to_path() allocates memory for terminating '\0' |
112 * so we do not need to reserve memory for '/' for possible redirect | 113 * so we do not need to reserve memory for '/' for possible redirect |
113 */ | 114 */ |
114 | 115 |
115 last = ngx_http_map_uri_to_path(r, &path, 0); | 116 last = ngx_http_map_uri_to_path(r, &path, &root, 0); |
116 if (last == NULL) { | 117 if (last == NULL) { |
117 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 118 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
118 } | 119 } |
119 | 120 |
120 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, | 121 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, |