comparison src/http/modules/ngx_http_static_handler.c @ 89:29bf798b583f

nginx-0.0.1-2003-05-15-19:42:53 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 15 May 2003 15:42:53 +0000
parents 674d333f4296
children a23d010f356d
comparison
equal deleted inserted replaced
88:674d333f4296 89:29bf798b583f
32 lcf = (ngx_http_event_static_handler_loc_conf_t *) 32 lcf = (ngx_http_event_static_handler_loc_conf_t *)
33 ngx_get_module_loc_conf(r, &ngx_http_event_static_handler_module_ctx); 33 ngx_get_module_loc_conf(r, &ngx_http_event_static_handler_module_ctx);
34 34
35 #endif 35 #endif
36 36
37 ngx_http_discard_body(r); 37 rc = ngx_http_discard_body(r);
38
39 if (rc != NGX_OK) {
40 return rc;
41 }
42
38 ctx = r->connection->log->data; 43 ctx = r->connection->log->data;
39 ctx->action = "sending response"; 44 ctx->action = "sending response";
40 45
41 if (r->file.fd == NGX_INVALID_FILE) { 46 if (r->file.fd == NGX_INVALID_FILE) {
42 r->file.fd = ngx_open_file(r->file.name.data, NGX_FILE_RDONLY); 47 r->file.fd = ngx_open_file(r->file.name.data, NGX_FILE_RDONLY);
72 } 77 }
73 78
74 r->file.info_valid = 1; 79 r->file.info_valid = 1;
75 } 80 }
76 81
77 #if !(WIN32) /* not regular files is probably Unix specific */ 82 #if !(WIN32) /* the not regular files are probably Unix specific */
78 83
79 if (!ngx_is_file(r->file.info)) { 84 if (!ngx_is_file(r->file.info)) {
80 ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno, 85 ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno,
81 "%s is not regular file", r->file.name.data); 86 "%s is not regular file", r->file.name.data);
82 87