Mercurial > hg > nginx-ranges
comparison src/event/ngx_event_openssl.c @ 489:549994537f15 NGINX_0_7_52
nginx 0.7.52
*) Feature: the first native Windows binary release.
*) Bugfix: in processing HEAD method while caching.
*) Bugfix: in processing the "If-Modified-Since", "If-Range", etc.
client request header lines while caching.
*) Bugfix: now the "Set-Cookie" and "P3P" header lines are hidden in
cacheable responses.
*) Bugfix: if nginx was built with the ngx_http_perl_module and with a
perl which supports threads, then during a master process exit the
message "panic: MUTEX_LOCK" might be issued.
*) Bugfix: nginx could not be built --without-http-cache; the bug had
appeared in 0.7.48.
*) Bugfix: nginx could not be built on platforms different from i386,
amd64, sparc, and ppc; the bug had appeared in 0.7.42.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 20 Apr 2009 00:00:00 +0400 |
parents | 56baf312c1b5 |
children | ed5e10fb40fc |
comparison
equal
deleted
inserted
replaced
488:eb4fdebda673 | 489:549994537f15 |
---|---|
1385 if (builtin_session_cache != NGX_SSL_DFLT_BUILTIN_SCACHE) { | 1385 if (builtin_session_cache != NGX_SSL_DFLT_BUILTIN_SCACHE) { |
1386 SSL_CTX_sess_set_cache_size(ssl->ctx, builtin_session_cache); | 1386 SSL_CTX_sess_set_cache_size(ssl->ctx, builtin_session_cache); |
1387 } | 1387 } |
1388 } | 1388 } |
1389 | 1389 |
1390 SSL_CTX_set_timeout(ssl->ctx, timeout); | 1390 SSL_CTX_set_timeout(ssl->ctx, (long) timeout); |
1391 | 1391 |
1392 if (shm_zone) { | 1392 if (shm_zone) { |
1393 shm_zone->init = ngx_ssl_session_cache_init; | 1393 shm_zone->init = ngx_ssl_session_cache_init; |
1394 | 1394 |
1395 SSL_CTX_sess_set_new_cb(ssl->ctx, ngx_ssl_new_session); | 1395 SSL_CTX_sess_set_new_cb(ssl->ctx, ngx_ssl_new_session); |
1419 if (data) { | 1419 if (data) { |
1420 shm_zone->data = data; | 1420 shm_zone->data = data; |
1421 return NGX_OK; | 1421 return NGX_OK; |
1422 } | 1422 } |
1423 | 1423 |
1424 if (shm_zone->shm.exists) { | |
1425 shm_zone->data = data; | |
1426 return NGX_OK; | |
1427 } | |
1428 | |
1424 shpool = (ngx_slab_pool_t *) shm_zone->shm.addr; | 1429 shpool = (ngx_slab_pool_t *) shm_zone->shm.addr; |
1425 | 1430 |
1426 cache = ngx_slab_alloc(shpool, sizeof(ngx_ssl_session_cache_t)); | 1431 cache = ngx_slab_alloc(shpool, sizeof(ngx_ssl_session_cache_t)); |
1427 if (cache == NULL) { | 1432 if (cache == NULL) { |
1428 return NGX_ERROR; | 1433 return NGX_ERROR; |
1429 } | 1434 } |
1430 | 1435 |
1436 shpool->data = cache; | |
1437 shm_zone->data = cache; | |
1438 | |
1431 ngx_rbtree_init(&cache->session_rbtree, &cache->sentinel, | 1439 ngx_rbtree_init(&cache->session_rbtree, &cache->sentinel, |
1432 ngx_ssl_session_rbtree_insert_value); | 1440 ngx_ssl_session_rbtree_insert_value); |
1433 | 1441 |
1434 ngx_queue_init(&cache->expire_queue); | 1442 ngx_queue_init(&cache->expire_queue); |
1435 | 1443 |
1436 len = sizeof(" in SSL session shared cache \"\"") + shm_zone->name.len; | 1444 len = sizeof(" in SSL session shared cache \"\"") + shm_zone->shm.name.len; |
1437 | 1445 |
1438 shpool->log_ctx = ngx_slab_alloc(shpool, len); | 1446 shpool->log_ctx = ngx_slab_alloc(shpool, len); |
1439 if (shpool->log_ctx == NULL) { | 1447 if (shpool->log_ctx == NULL) { |
1440 return NGX_ERROR; | 1448 return NGX_ERROR; |
1441 } | 1449 } |
1442 | 1450 |
1443 ngx_sprintf(shpool->log_ctx, " in SSL session shared cache \"%V\"%Z", | 1451 ngx_sprintf(shpool->log_ctx, " in SSL session shared cache \"%V\"%Z", |
1444 &shm_zone->name); | 1452 &shm_zone->shm.name); |
1445 | |
1446 shm_zone->data = cache; | |
1447 | 1453 |
1448 return NGX_OK; | 1454 return NGX_OK; |
1449 } | 1455 } |
1450 | 1456 |
1451 | 1457 |