comparison src/http/ngx_http_request.c @ 2224:109849282793

*) listen ssl *) no default ssl_cetificate and ssl_cetificate_key
author Igor Sysoev <igor@sysoev.ru>
date Mon, 01 Sep 2008 14:19:01 +0000
parents 5398f47082f0
children f62751dab60d
comparison
equal deleted inserted replaced
2223:005fc65f7ce7 2224:109849282793
355 355
356 { 356 {
357 ngx_http_ssl_srv_conf_t *sscf; 357 ngx_http_ssl_srv_conf_t *sscf;
358 358
359 sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module); 359 sscf = ngx_http_get_module_srv_conf(r, ngx_http_ssl_module);
360 if (sscf->enable) { 360 if (sscf->enable || hia[i].ssl) {
361 361
362 if (c->ssl == NULL) { 362 if (c->ssl == NULL) {
363
364 c->log->action = "SSL handshaking";
365
366 if (hia[i].ssl && sscf->ssl.ctx == NULL) {
367 ngx_log_error(NGX_LOG_ERR, c->log, 0,
368 "no \"ssl_certificate\" is defined "
369 "in server listening on SSL port");
370 ngx_http_close_connection(c);
371 return;
372 }
373
363 if (ngx_ssl_create_connection(&sscf->ssl, c, NGX_SSL_BUFFER) 374 if (ngx_ssl_create_connection(&sscf->ssl, c, NGX_SSL_BUFFER)
364 == NGX_ERROR) 375 == NGX_ERROR)
365 { 376 {
366 ngx_http_close_connection(c); 377 ngx_http_close_connection(c);
367 return; 378 return;
526 "plain http"); 537 "plain http");
527 538
528 r->plain_http = 1; 539 r->plain_http = 1;
529 } 540 }
530 } 541 }
542
543 c->log->action = "reading client request line";
531 544
532 rev->handler = ngx_http_process_request_line; 545 rev->handler = ngx_http_process_request_line;
533 ngx_http_process_request_line(rev); 546 ngx_http_process_request_line(rev);
534 } 547 }
535 548