aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-09-06 16:09:32 +0000
committerIgor Sysoev <igor@sysoev.ru>2005-09-06 16:09:32 +0000
commitceb992921cee6f76d1752af2d388ee6a1d71e078 (patch)
tree2b4916a12d02210134939b7fb388a270e76002fa /src/http/ngx_http_request.c
parent5650106a09de8e8d876ed38fbff57b2161d910c4 (diff)
downloadnginx-ceb992921cee6f76d1752af2d388ee6a1d71e078.tar.gz
nginx-ceb992921cee6f76d1752af2d388ee6a1d71e078.zip
nginx-0.1.44-RELEASE importrelease-0.1.44
*) Feature: the IMAP/POP3 proxy supports SSL. *) Feature: the "proxy_timeout" directive of the ngx_imap_proxy_module. *) Feature: the "userid_mark" directive. *) Feature: the $remote_user variable value is determined independently of authorization use.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c53
1 files changed, 28 insertions, 25 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index b8e97d2a7..594a272ed 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -11,9 +11,6 @@
static void ngx_http_init_request(ngx_event_t *ev);
-#if (NGX_HTTP_SSL)
-static void ngx_http_ssl_handshake(ngx_event_t *rev);
-#endif
static void ngx_http_process_request_line(ngx_event_t *rev);
static void ngx_http_process_request_headers(ngx_event_t *rev);
static ssize_t ngx_http_read_request_header(ngx_http_request_t *r);
@@ -50,6 +47,11 @@ static u_char *ngx_http_log_error(ngx_log_t *log, u_char *buf, size_t len);
static u_char *ngx_http_log_error_handler(ngx_http_request_t *r, u_char *buf,
size_t len);
+#if (NGX_HTTP_SSL)
+static void ngx_http_ssl_handshake(ngx_event_t *rev);
+static void ngx_http_ssl_close_handler(ngx_event_t *ev);
+#endif
+
static char *ngx_http_client_errors[] = {
@@ -490,6 +492,7 @@ ngx_http_ssl_handshake(ngx_event_t *rev)
"https ssl handshake: 0x%02Xd", buf[0]);
c->recv = ngx_ssl_recv;
+ c->send = ngx_ssl_write;
c->send_chain = ngx_ssl_send_chain;
rc = ngx_ssl_handshake(c);
@@ -2412,27 +2415,6 @@ ngx_http_close_request(ngx_http_request_t *r, ngx_int_t error)
}
-#if (NGX_HTTP_SSL)
-
-static void
-ngx_http_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
-
-
static void
ngx_http_close_connection(ngx_connection_t *c)
{
@@ -2441,7 +2423,7 @@ ngx_http_close_connection(ngx_connection_t *c)
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0,
"close http connection: %d", c->fd);
-#if (NGX_OPENSSL)
+#if (NGX_HTTP_SSL)
if (c->ssl) {
if (ngx_ssl_shutdown(c) == NGX_AGAIN) {
@@ -2465,6 +2447,27 @@ ngx_http_close_connection(ngx_connection_t *c)
}
+#if (NGX_HTTP_SSL)
+
+static void
+ngx_http_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
+
+
static u_char *
ngx_http_log_error(ngx_log_t *log, u_char *buf, size_t len)
{