[nginx] svn commit: r4697 - trunk/src/event
igor at sysoev.ru
igor at sysoev.ru
Wed Jun 20 12:55:29 UTC 2012
Author: is
Date: 2012-06-20 12:55:28 +0000 (Wed, 20 Jun 2012)
New Revision: 4697
URL: http://trac.nginx.org/nginx/changeset/4697/nginx
Log:
Disabled gzip compression in OpenSSL prior to 1.0.0 version.
This saves about 522K per connection.
Modified:
trunk/src/event/ngx_event_openssl.c
Modified: trunk/src/event/ngx_event_openssl.c
===================================================================
--- trunk/src/event/ngx_event_openssl.c 2012-06-19 12:36:54 UTC (rev 4696)
+++ trunk/src/event/ngx_event_openssl.c 2012-06-20 12:55:28 UTC (rev 4697)
@@ -94,6 +94,24 @@
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);
if (ngx_ssl_connection_index == -1) {
More information about the nginx-devel
mailing list