From 4aa888820d3f13a225ee6bdd596305ea3b4db6f4 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 14 Jul 2004 20:07:58 +0000 Subject: nginx-0.0.7-2004-07-15-00:07:58 import --- src/http/ngx_http_request.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/http/ngx_http_request.c') diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 65b024d75..d0c92edcc 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -229,6 +229,11 @@ static void ngx_http_init_request(ngx_event_t *rev) r->srv_conf = cscf->ctx->srv_conf; r->loc_conf = cscf->ctx->loc_conf; +#if 1 + r->ssl = 1; + r->filter_need_in_memory = 1; +#endif + server_name = cscf->server_names.elts; r->server_name = &server_name->name; @@ -815,12 +820,17 @@ static ssize_t ngx_http_read_request_header(ngx_http_request_t *r) return NGX_AGAIN; } -#if 0 - n = ngx_http_ssl_read(r, r->header_in->last, - r->header_in->end - r->header_in->last); -#else - n = ngx_recv(r->connection, r->header_in->last, - r->header_in->end - r->header_in->last); +/* STUB */ +#if (NGX_OPENSSL) + if (r->ssl) { + n = ngx_http_ssl_read(r, r->header_in->last, + r->header_in->end - r->header_in->last); + } else { +#endif + n = ngx_recv(r->connection, r->header_in->last, + r->header_in->end - r->header_in->last); +#if (NGX_OPENSSL) + } #endif if (n == NGX_AGAIN) { -- cgit v1.2.3