diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2007-07-22 08:47:45 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2007-07-22 08:47:45 +0000 |
| commit | 64bb1e34d24f805a278da05e55efd449be76e57f (patch) | |
| tree | bf4555e728d672cf86c58f163eb7e1e8f3b0bdb1 /src/http/modules/ngx_http_ssl_module.c | |
| parent | fbd3b2d727af9cc308d0a0c82812d5181f9a477e (diff) | |
| download | nginx-64bb1e34d24f805a278da05e55efd449be76e57f.tar.gz nginx-64bb1e34d24f805a278da05e55efd449be76e57f.tar.bz2 | |
r1306, r1307, r1308, r1309, r1310, r1311, r1322, r1325 merge:
Sun Studio related fixes
Diffstat (limited to 'src/http/modules/ngx_http_ssl_module.c')
| -rw-r--r-- | src/http/modules/ngx_http_ssl_module.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c index 7376d1028..1ffa54fb5 100644 --- 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_request_t *r, { 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 *r, ngx_http_variable_value_t *v, { 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; |
