mirror of
https://github.com/nginx/nginx.git
synced 2024-12-11 09:49:02 +08:00
Disabled gzip compression in OpenSSL prior to 1.0.0 version.
This saves about 522K per connection.
This commit is contained in:
parent
36a931aba6
commit
992a4d11da
@ -94,6 +94,24 @@ ngx_ssl_init(ngx_log_t *log)
|
|||||||
|
|
||||||
OpenSSL_add_all_algorithms();
|
OpenSSL_add_all_algorithms();
|
||||||
|
|
||||||
|
#ifndef SSL_OP_NO_COMPRESSION
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Disable gzip compression in OpenSSL prior to 1.0.0 version,
|
||||||
|
* this saves about 522K per connection.
|
||||||
|
*/
|
||||||
|
int i, 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ngx_ssl_connection_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL);
|
ngx_ssl_connection_index = SSL_get_ex_new_index(0, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
if (ngx_ssl_connection_index == -1) {
|
if (ngx_ssl_connection_index == -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user