diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2012-09-27 17:59:59 +0000 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2012-09-27 17:59:59 +0000 |
commit | f4f72f9fb58e8ee4ef85e41d0702c7790c712362 (patch) | |
tree | 2f319ff64a93881268aa369f419175d3e21da518 /src | |
parent | 181d58f9c9e6b8c2d1642eab35696e62438b5ee0 (diff) | |
download | nginx-f4f72f9fb58e8ee4ef85e41d0702c7790c712362.tar.gz nginx-f4f72f9fb58e8ee4ef85e41d0702c7790c712362.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/event/ngx_event_openssl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c index 4356a05ef..93d3f651b 100644 --- a/src/event/ngx_event_openssl.c +++ b/src/event/ngx_event_openssl.c @@ -100,14 +100,14 @@ ngx_ssl_init(ngx_log_t *log) * 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 |