Mercurial > hg > nginx
changeset 4867:90bbf2adb2c9
SSL: fixed compression workaround to remove all methods.
Previous code used sk_SSL_COMP_delete(ssl_comp_methods, i) while iterating
stack from 0 to n, resulting in removal of only even compression methods.
In real life this change is a nop, as there is only one compression method
which is enabled by default in OpenSSL.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 27 Sep 2012 17:59:59 +0000 |
parents | fac1cc762969 |
children | 22a6ef66b6f5 |
files | src/event/ngx_event_openssl.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/event/ngx_event_openssl.c Thu Sep 27 15:01:57 2012 +0000 +++ b/src/event/ngx_event_openssl.c Thu Sep 27 17:59:59 2012 +0000 @@ -100,14 +100,14 @@ * Disable gzip compression in OpenSSL prior to 1.0.0 version, * this saves about 522K per connection. */ - int i, n; + int n; STACK_OF(SSL_COMP) *ssl_comp_methods; ssl_comp_methods = SSL_COMP_get_compression_methods(); n = sk_SSL_COMP_num(ssl_comp_methods); - for (i = 0; i < n; i++) { - (void) sk_SSL_COMP_delete(ssl_comp_methods, i); + while (n--) { + (void) sk_SSL_COMP_pop(ssl_comp_methods); } } #endif