nginx-0.1.44-RELEASE import
*) 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.
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index b8e97d2..594a272 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_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 @@
"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 @@
}
-#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_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 @@
}
+#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)
{