Mercurial > hg > nginx-vendor-0-5
diff src/http/modules/ngx_http_ssl_module.c @ 318:3021f899881a NGINX_0_5_29
nginx 0.5.29
*) Feature: $nginx_version variable.
Thanks to Nick S. Grechukh.
*) Bugfix: if the FastCGI header was split in records, then nginx
passed garbage in the header to a client.
*) Bugfix: Sun Studio compatibility on Solaris/amd64 and
Solaris/sparc64.
Thanks to Jiang Hong and Andrei Nigmatulin.
*) Bugfix: of minor potential bugs.
Thanks to Coverity's Scan.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 23 Jul 2007 00:00:00 +0400 |
parents | 55328d69b335 |
children | 26ff8d6b618d |
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;