[nginx] svn commit: r4732 - in branches/stable-1.2: . src/event
mdounin at mdounin.ru
mdounin at mdounin.ru
Mon Jul 2 17:25:51 UTC 2012
Author: mdounin
Date: 2012-07-02 17:25:51 +0000 (Mon, 02 Jul 2012)
New Revision: 4732
URL: http://trac.nginx.org/nginx/changeset/4732/nginx
Log:
Merge of r4697: disabled gzip in OpenSSL prior to 1.0.0.
Disabled gzip compression in OpenSSL prior to 1.0.0 version.
This saves about 522K per connection.
Modified:
branches/stable-1.2/
branches/stable-1.2/src/event/ngx_event_openssl.c
Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2 2012-07-02 17:22:31 UTC (rev 4731)
+++ branches/stable-1.2 2012-07-02 17:25:51 UTC (rev 4732)
Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4696,4699,4704-4706
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4697,4699,4704-4706
\ No newline at end of property
Modified: branches/stable-1.2/src/event/ngx_event_openssl.c
===================================================================
--- branches/stable-1.2/src/event/ngx_event_openssl.c 2012-07-02 17:22:31 UTC (rev 4731)
+++ branches/stable-1.2/src/event/ngx_event_openssl.c 2012-07-02 17:25:51 UTC (rev 4732)
@@ -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