diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-07-16 06:33:35 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-07-16 06:33:35 +0000 |
commit | 0ad253766fb8d62f257c446410a632a596ac5783 (patch) | |
tree | 52af0662727e4f9129a15eb18cd690b8180bd0e5 /src/http/ngx_http_request.c | |
parent | 1c3567ecc81a9f07f3c3d53912114bc5bd5daffa (diff) | |
download | nginx-0ad253766fb8d62f257c446410a632a596ac5783.tar.gz nginx-0ad253766fb8d62f257c446410a632a596ac5783.zip |
nginx-0.0.7-2004-07-16-10:33:35 import
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r-- | src/http/ngx_http_request.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c index 49e809462..302b92497 100644 --- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1423,7 +1423,7 @@ static void ngx_http_keepalive_handler(ngx_event_t *rev) ngx_connection_t *c; ngx_http_log_ctx_t *ctx; - c = (ngx_connection_t *) rev->data; + c = rev->data; ngx_log_debug0(NGX_LOG_DEBUG_HTTP, c->log, 0, "http keepalive handler"); @@ -1725,6 +1725,26 @@ void ngx_http_close_request(ngx_http_request_t *r, int error) } +#if (NGX_HTTP_SSL) + +void ngx_ssl_close_handler(ngx_event_t *ev) +{ + ngx_connection_t *c; + + c = ev->data; + + ngx_log_debug0(NGX_LOG_DEBUG_HTTP, ev->log, 0, "http ssl close handler"); + + if (ngx_ssl_shutdown(c) == NGX_AGAIN) { + return; + } + + ngx_http_close_connection(c); +} + +#endif + + void ngx_http_close_connection(ngx_connection_t *c) { ngx_socket_t fd; @@ -1737,6 +1757,18 @@ void ngx_http_close_connection(ngx_connection_t *c) return; } +#if (NGX_HTTP_SSL) + + if (c->ssl) { + if (ngx_ssl_shutdown(c) == NGX_AGAIN) { + c->read->event_handler = ngx_ssl_close_handler; + c->write->event_handler = ngx_ssl_close_handler; + return; + } + } + +#endif + if (c->read->timer_set) { ngx_del_timer(c->read); } |