Mercurial > hg > nginx
comparison src/http/modules/ngx_http_auth_basic_module.c @ 681:7e24168b0853 release-0.4.0
nginx-0.4.0-RELEASE import
*) Change in internal API: the HTTP modules initialization was moved
from the init module phase to the HTTP postconfiguration phase.
*) Change: now the request body is not read beforehand for the
ngx_http_perl_module: it's required to start the reading using the
$r->has_request_body method.
*) Feature: the ngx_http_perl_module supports the DECLINED return code.
*) Feature: the ngx_http_dav_module supports the incoming "Date" header
line for the PUT method.
*) Feature: the "ssi" directive is available inside the "if" block.
*) Bugfix: a segmentation fault occurred if there was an "index"
directive with variables and the first index name was without
variables; the bug had appeared in 0.1.29.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 30 Aug 2006 10:39:17 +0000 |
parents | 63a820b0bc6c |
children | 6356b34cf027 |
comparison
equal
deleted
inserted
replaced
680:63a949f7ed4f | 681:7e24168b0853 |
---|---|
30 ngx_str_t *realm); | 30 ngx_str_t *realm); |
31 static void ngx_http_auth_basic_close(ngx_file_t *file); | 31 static void ngx_http_auth_basic_close(ngx_file_t *file); |
32 static void *ngx_http_auth_basic_create_loc_conf(ngx_conf_t *cf); | 32 static void *ngx_http_auth_basic_create_loc_conf(ngx_conf_t *cf); |
33 static char *ngx_http_auth_basic_merge_loc_conf(ngx_conf_t *cf, | 33 static char *ngx_http_auth_basic_merge_loc_conf(ngx_conf_t *cf, |
34 void *parent, void *child); | 34 void *parent, void *child); |
35 static ngx_int_t ngx_http_auth_basic_init(ngx_cycle_t *cycle); | 35 static ngx_int_t ngx_http_auth_basic_init(ngx_conf_t *cf); |
36 static char *ngx_http_auth_basic(ngx_conf_t *cf, void *post, void *data); | 36 static char *ngx_http_auth_basic(ngx_conf_t *cf, void *post, void *data); |
37 | 37 |
38 | 38 |
39 static ngx_conf_post_handler_pt ngx_http_auth_basic_p = ngx_http_auth_basic; | 39 static ngx_conf_post_handler_pt ngx_http_auth_basic_p = ngx_http_auth_basic; |
40 | 40 |
60 }; | 60 }; |
61 | 61 |
62 | 62 |
63 static ngx_http_module_t ngx_http_auth_basic_module_ctx = { | 63 static ngx_http_module_t ngx_http_auth_basic_module_ctx = { |
64 NULL, /* preconfiguration */ | 64 NULL, /* preconfiguration */ |
65 NULL, /* postconfiguration */ | 65 ngx_http_auth_basic_init, /* postconfiguration */ |
66 | 66 |
67 NULL, /* create main configuration */ | 67 NULL, /* create main configuration */ |
68 NULL, /* init main configuration */ | 68 NULL, /* init main configuration */ |
69 | 69 |
70 NULL, /* create server configuration */ | 70 NULL, /* create server configuration */ |
79 NGX_MODULE_V1, | 79 NGX_MODULE_V1, |
80 &ngx_http_auth_basic_module_ctx, /* module context */ | 80 &ngx_http_auth_basic_module_ctx, /* module context */ |
81 ngx_http_auth_basic_commands, /* module directives */ | 81 ngx_http_auth_basic_commands, /* module directives */ |
82 NGX_HTTP_MODULE, /* module type */ | 82 NGX_HTTP_MODULE, /* module type */ |
83 NULL, /* init master */ | 83 NULL, /* init master */ |
84 ngx_http_auth_basic_init, /* init module */ | 84 NULL, /* init module */ |
85 NULL, /* init process */ | 85 NULL, /* init process */ |
86 NULL, /* init thread */ | 86 NULL, /* init thread */ |
87 NULL, /* exit thread */ | 87 NULL, /* exit thread */ |
88 NULL, /* exit process */ | 88 NULL, /* exit process */ |
89 NULL, /* exit master */ | 89 NULL, /* exit master */ |
349 return NGX_CONF_OK; | 349 return NGX_CONF_OK; |
350 } | 350 } |
351 | 351 |
352 | 352 |
353 static ngx_int_t | 353 static ngx_int_t |
354 ngx_http_auth_basic_init(ngx_cycle_t *cycle) | 354 ngx_http_auth_basic_init(ngx_conf_t *cf) |
355 { | 355 { |
356 ngx_http_handler_pt *h; | 356 ngx_http_handler_pt *h; |
357 ngx_http_core_main_conf_t *cmcf; | 357 ngx_http_core_main_conf_t *cmcf; |
358 | 358 |
359 cmcf = ngx_http_cycle_get_module_main_conf(cycle, ngx_http_core_module); | 359 cmcf = ngx_http_conf_get_module_main_conf(cf, ngx_http_core_module); |
360 | 360 |
361 h = ngx_array_push(&cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers); | 361 h = ngx_array_push(&cmcf->phases[NGX_HTTP_ACCESS_PHASE].handlers); |
362 if (h == NULL) { | 362 if (h == NULL) { |
363 return NGX_ERROR; | 363 return NGX_ERROR; |
364 } | 364 } |