Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 6474:2cd019520210
Style.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 30 Mar 2016 11:52:16 +0300 |
parents | 155871d773cc |
children | 3ef7bb882ad4 |
comparison
equal
deleted
inserted
replaced
6473:9d7326d3f474 | 6474:2cd019520210 |
---|---|
1220 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 1220 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
1221 return NGX_OK; | 1221 return NGX_OK; |
1222 } | 1222 } |
1223 | 1223 |
1224 name = path.data + root; | 1224 name = path.data + root; |
1225 } | 1225 } |
1226 | 1226 |
1227 if (tf->values == NULL) { | 1227 if (tf->values == NULL) { |
1228 | 1228 |
1229 /* tf->name.len includes the terminating '\0' */ | 1229 /* tf->name.len includes the terminating '\0' */ |
1230 | 1230 |
3102 | 3102 |
3103 if (module->create_loc_conf) { | 3103 if (module->create_loc_conf) { |
3104 ctx->loc_conf[cf->cycle->modules[i]->ctx_index] = | 3104 ctx->loc_conf[cf->cycle->modules[i]->ctx_index] = |
3105 module->create_loc_conf(cf); | 3105 module->create_loc_conf(cf); |
3106 if (ctx->loc_conf[cf->cycle->modules[i]->ctx_index] == NULL) { | 3106 if (ctx->loc_conf[cf->cycle->modules[i]->ctx_index] == NULL) { |
3107 return NGX_CONF_ERROR; | 3107 return NGX_CONF_ERROR; |
3108 } | 3108 } |
3109 } | 3109 } |
3110 } | 3110 } |
3111 | 3111 |
3112 clcf = ctx->loc_conf[ngx_http_core_module.ctx_index]; | 3112 clcf = ctx->loc_conf[ngx_http_core_module.ctx_index]; |
4538 return NGX_CONF_OK; | 4538 return NGX_CONF_OK; |
4539 } | 4539 } |
4540 | 4540 |
4541 | 4541 |
4542 static ngx_http_method_name_t ngx_methods_names[] = { | 4542 static ngx_http_method_name_t ngx_methods_names[] = { |
4543 { (u_char *) "GET", (uint32_t) ~NGX_HTTP_GET }, | 4543 { (u_char *) "GET", (uint32_t) ~NGX_HTTP_GET }, |
4544 { (u_char *) "HEAD", (uint32_t) ~NGX_HTTP_HEAD }, | 4544 { (u_char *) "HEAD", (uint32_t) ~NGX_HTTP_HEAD }, |
4545 { (u_char *) "POST", (uint32_t) ~NGX_HTTP_POST }, | 4545 { (u_char *) "POST", (uint32_t) ~NGX_HTTP_POST }, |
4546 { (u_char *) "PUT", (uint32_t) ~NGX_HTTP_PUT }, | 4546 { (u_char *) "PUT", (uint32_t) ~NGX_HTTP_PUT }, |
4547 { (u_char *) "DELETE", (uint32_t) ~NGX_HTTP_DELETE }, | 4547 { (u_char *) "DELETE", (uint32_t) ~NGX_HTTP_DELETE }, |
4548 { (u_char *) "MKCOL", (uint32_t) ~NGX_HTTP_MKCOL }, | 4548 { (u_char *) "MKCOL", (uint32_t) ~NGX_HTTP_MKCOL }, |
4549 { (u_char *) "COPY", (uint32_t) ~NGX_HTTP_COPY }, | 4549 { (u_char *) "COPY", (uint32_t) ~NGX_HTTP_COPY }, |
4550 { (u_char *) "MOVE", (uint32_t) ~NGX_HTTP_MOVE }, | 4550 { (u_char *) "MOVE", (uint32_t) ~NGX_HTTP_MOVE }, |
4551 { (u_char *) "OPTIONS", (uint32_t) ~NGX_HTTP_OPTIONS }, | 4551 { (u_char *) "OPTIONS", (uint32_t) ~NGX_HTTP_OPTIONS }, |
4552 { (u_char *) "PROPFIND", (uint32_t) ~NGX_HTTP_PROPFIND }, | 4552 { (u_char *) "PROPFIND", (uint32_t) ~NGX_HTTP_PROPFIND }, |
4553 { (u_char *) "PROPPATCH", (uint32_t) ~NGX_HTTP_PROPPATCH }, | 4553 { (u_char *) "PROPPATCH", (uint32_t) ~NGX_HTTP_PROPPATCH }, |
4554 { (u_char *) "LOCK", (uint32_t) ~NGX_HTTP_LOCK }, | 4554 { (u_char *) "LOCK", (uint32_t) ~NGX_HTTP_LOCK }, |
4555 { (u_char *) "UNLOCK", (uint32_t) ~NGX_HTTP_UNLOCK }, | 4555 { (u_char *) "UNLOCK", (uint32_t) ~NGX_HTTP_UNLOCK }, |
4556 { (u_char *) "PATCH", (uint32_t) ~NGX_HTTP_PATCH }, | 4556 { (u_char *) "PATCH", (uint32_t) ~NGX_HTTP_PATCH }, |
4557 { NULL, 0 } | 4557 { NULL, 0 } |
4558 }; | 4558 }; |
4559 | 4559 |
4560 | 4560 |
4561 static char * | 4561 static char * |
4562 ngx_http_core_limit_except(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) | 4562 ngx_http_core_limit_except(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) |
4625 | 4625 |
4626 if (module->create_loc_conf) { | 4626 if (module->create_loc_conf) { |
4627 | 4627 |
4628 mconf = module->create_loc_conf(cf); | 4628 mconf = module->create_loc_conf(cf); |
4629 if (mconf == NULL) { | 4629 if (mconf == NULL) { |
4630 return NGX_CONF_ERROR; | 4630 return NGX_CONF_ERROR; |
4631 } | 4631 } |
4632 | 4632 |
4633 ctx->loc_conf[cf->cycle->modules[i]->ctx_index] = mconf; | 4633 ctx->loc_conf[cf->cycle->modules[i]->ctx_index] = mconf; |
4634 } | 4634 } |
4635 } | 4635 } |