Merging r4010, r4065:
SSL related fixes: *) Fixing proxy_set_body and proxy_pass_request_body with SSL. Flush flag wasn't set in constructed buffer and this prevented any data from being actually sent to upstream due to SSL buffering. Make sure we always set flush in the last buffer we are going to sent. See here for report: http://nginx.org/pipermail/nginx-ru/2011-June/041552.html *) Proper SSL shutdown handling. If connection has unsent alerts, SSL_shutdown() tries to send them even if SSL_set_shutdown(SSL_RECEIVED_SHUTDOWN|SSL_SENT_SHUTDOWN) was used. This can be prevented by SSL_set_quiet_shutdown(). SSL_set_shutdown() is required nevertheless to preserve session.
This commit is contained in:
parent
31a47bc963
commit
23aceec62e
2 changed files with 6 additions and 2 deletions
|
@ -1205,6 +1205,7 @@ ngx_ssl_shutdown(ngx_connection_t *c)
|
|||
|
||||
if (c->timedout) {
|
||||
mode = SSL_RECEIVED_SHUTDOWN|SSL_SENT_SHUTDOWN;
|
||||
SSL_set_quiet_shutdown(c->ssl->connection, 1);
|
||||
|
||||
} else {
|
||||
mode = SSL_get_shutdown(c->ssl->connection);
|
||||
|
@ -1216,6 +1217,10 @@ ngx_ssl_shutdown(ngx_connection_t *c)
|
|||
if (c->ssl->no_send_shutdown) {
|
||||
mode |= SSL_SENT_SHUTDOWN;
|
||||
}
|
||||
|
||||
if (c->ssl->no_wait_shutdown && c->ssl->no_send_shutdown) {
|
||||
SSL_set_quiet_shutdown(c->ssl->connection, 1);
|
||||
}
|
||||
}
|
||||
|
||||
SSL_set_shutdown(c->ssl->connection, mode);
|
||||
|
|
|
@ -1132,12 +1132,11 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
|
|||
body = body->next;
|
||||
}
|
||||
|
||||
b->flush = 1;
|
||||
|
||||
} else {
|
||||
u->request_bufs = cl;
|
||||
}
|
||||
|
||||
b->flush = 1;
|
||||
cl->next = NULL;
|
||||
|
||||
return NGX_OK;
|
||||
|
|
Loading…
Reference in a new issue