Mercurial > hg > nginx-vendor-current
diff src/http/modules/ngx_http_ssl_module.c @ 320:95183808f549 NGINX_0_6_4
nginx 0.6.4
*) Security: the "msie_refresh" directive allowed XSS.
Thanks to Maxim Boguk.
*) Change: the "proxy_store" and "fastcgi_store" directives were
changed.
*) Feature: the "proxy_store_access" and "fastcgi_store_access"
directives.
*) Bugfix: nginx did not work on Solaris/sparc64 if it was built by Sun
Studio.
Thanks to Andrei Nigmatulin.
*) Workaround: for Sun Studio 12.
Thanks to Jiang Hong.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 17 Jul 2007 00:00:00 +0400 |
parents | 55328d69b335 |
children | 10cc350ed8a1 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_ssl_module.c +++ b/src/http/modules/ngx_http_ssl_module.c @@ -197,11 +197,14 @@ ngx_http_ssl_static_variable(ngx_http_re { ngx_ssl_variable_handler_pt handler = (ngx_ssl_variable_handler_pt) data; - size_t len; + size_t len; + ngx_str_t s; if (r->connection->ssl) { - (void) handler(r->connection, NULL, (ngx_str_t *) v); + (void) handler(r->connection, NULL, &s); + + v->data = s.data; for (len = 0; v->data[len]; len++) { /* void */ } @@ -225,11 +228,17 @@ ngx_http_ssl_variable(ngx_http_request_t { ngx_ssl_variable_handler_pt handler = (ngx_ssl_variable_handler_pt) data; + ngx_str_t s; + if (r->connection->ssl) { - if (handler(r->connection, r->pool, (ngx_str_t *) v) != NGX_OK) { + + if (handler(r->connection, r->pool, &s) != NGX_OK) { return NGX_ERROR; } + v->len = s.len; + v->data = s.data; + if (v->len) { v->valid = 1; v->no_cachable = 0;