Mercurial > hg > nginx-quic
comparison src/http/ngx_http_request.c @ 1704:e584e946e198
move condition declarations inside blocks where they are used
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 10 Dec 2007 12:09:51 +0000 |
parents | c997912a8f0b |
children | 3748e50f9b23 |
comparison
equal
deleted
inserted
replaced
1703:43747661804d | 1704:e584e946e198 |
---|---|
230 ngx_http_log_ctx_t *ctx; | 230 ngx_http_log_ctx_t *ctx; |
231 ngx_http_connection_t *hc; | 231 ngx_http_connection_t *hc; |
232 ngx_http_core_srv_conf_t *cscf; | 232 ngx_http_core_srv_conf_t *cscf; |
233 ngx_http_core_loc_conf_t *clcf; | 233 ngx_http_core_loc_conf_t *clcf; |
234 ngx_http_core_main_conf_t *cmcf; | 234 ngx_http_core_main_conf_t *cmcf; |
235 #if (NGX_HTTP_SSL) | |
236 ngx_http_ssl_srv_conf_t *sscf; | |
237 #endif | |
238 | 235 |
239 #if (NGX_STAT_STUB) | 236 #if (NGX_STAT_STUB) |
240 ngx_atomic_fetch_add(ngx_stat_reading, -1); | 237 ngx_atomic_fetch_add(ngx_stat_reading, -1); |
241 #endif | 238 #endif |
242 | 239 |
352 | 349 |
353 rev->handler = ngx_http_process_request_line; | 350 rev->handler = ngx_http_process_request_line; |
354 | 351 |
355 #if (NGX_HTTP_SSL) | 352 #if (NGX_HTTP_SSL) |
356 | 353 |
354 { | |
355 ngx_http_ssl_srv_conf_t *sscf; | |
356 | |
357 sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module); | 357 sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module); |
358 if (sscf->enable) { | 358 if (sscf->enable) { |
359 | 359 |
360 if (c->ssl == NULL) { | 360 if (c->ssl == NULL) { |
361 if (ngx_ssl_create_connection(&sscf->ssl, c, NGX_SSL_BUFFER) | 361 if (ngx_ssl_create_connection(&sscf->ssl, c, NGX_SSL_BUFFER) |
367 | 367 |
368 rev->handler = ngx_http_ssl_handshake; | 368 rev->handler = ngx_http_ssl_handshake; |
369 } | 369 } |
370 | 370 |
371 r->main_filter_need_in_memory = 1; | 371 r->main_filter_need_in_memory = 1; |
372 } | |
372 } | 373 } |
373 | 374 |
374 #endif | 375 #endif |
375 | 376 |
376 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); | 377 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); |
1396 | 1397 |
1397 | 1398 |
1398 static void | 1399 static void |
1399 ngx_http_process_request(ngx_http_request_t *r) | 1400 ngx_http_process_request(ngx_http_request_t *r) |
1400 { | 1401 { |
1401 ngx_connection_t *c; | 1402 ngx_connection_t *c; |
1402 #if (NGX_HTTP_SSL) | |
1403 long rc; | |
1404 ngx_http_ssl_srv_conf_t *sscf; | |
1405 #endif | |
1406 | 1403 |
1407 c = r->connection; | 1404 c = r->connection; |
1408 | 1405 |
1409 if (r->plain_http) { | 1406 if (r->plain_http) { |
1410 ngx_log_error(NGX_LOG_INFO, c->log, 0, | 1407 ngx_log_error(NGX_LOG_INFO, c->log, 0, |
1414 } | 1411 } |
1415 | 1412 |
1416 #if (NGX_HTTP_SSL) | 1413 #if (NGX_HTTP_SSL) |
1417 | 1414 |
1418 if (c->ssl) { | 1415 if (c->ssl) { |
1416 long rc; | |
1417 ngx_http_ssl_srv_conf_t *sscf; | |
1418 | |
1419 sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module); | 1419 sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module); |
1420 | 1420 |
1421 if (sscf->verify) { | 1421 if (sscf->verify) { |
1422 rc = SSL_get_verify_result(c->ssl->connection); | 1422 rc = SSL_get_verify_result(c->ssl->connection); |
1423 | 1423 |
1467 ngx_http_find_virtual_server(ngx_http_request_t *r, u_char *host, size_t len, | 1467 ngx_http_find_virtual_server(ngx_http_request_t *r, u_char *host, size_t len, |
1468 ngx_uint_t hash) | 1468 ngx_uint_t hash) |
1469 { | 1469 { |
1470 ngx_http_core_loc_conf_t *clcf; | 1470 ngx_http_core_loc_conf_t *clcf; |
1471 ngx_http_core_srv_conf_t *cscf; | 1471 ngx_http_core_srv_conf_t *cscf; |
1472 #if (NGX_PCRE) | |
1473 ngx_int_t n; | |
1474 ngx_uint_t i; | |
1475 ngx_str_t name; | |
1476 ngx_http_server_name_t *sn; | |
1477 #endif | |
1478 | 1472 |
1479 cscf = ngx_hash_find_combined(&r->virtual_names->names, hash, host, len); | 1473 cscf = ngx_hash_find_combined(&r->virtual_names->names, hash, host, len); |
1480 | 1474 |
1481 if (cscf) { | 1475 if (cscf) { |
1482 goto found; | 1476 goto found; |
1483 } | 1477 } |
1484 | 1478 |
1485 #if (NGX_PCRE) | 1479 #if (NGX_PCRE) |
1486 | 1480 |
1487 if (r->virtual_names->nregex) { | 1481 if (r->virtual_names->nregex) { |
1482 ngx_int_t n; | |
1483 ngx_uint_t i; | |
1484 ngx_str_t name; | |
1485 ngx_http_server_name_t *sn; | |
1488 | 1486 |
1489 name.len = len; | 1487 name.len = len; |
1490 name.data = host; | 1488 name.data = host; |
1491 | 1489 |
1492 sn = r->virtual_names->regex; | 1490 sn = r->virtual_names->regex; |