diff options
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/ngx_hunk.c | 24 | ||||
| -rw-r--r-- | src/core/ngx_hunk.h | 5 | ||||
| -rw-r--r-- | src/core/ngx_modules.c | 3 |
3 files changed, 31 insertions, 1 deletions
diff --git a/src/core/ngx_hunk.c b/src/core/ngx_hunk.c index 29b88772a..1441b7c08 100644 --- a/src/core/ngx_hunk.c +++ b/src/core/ngx_hunk.c @@ -99,6 +99,30 @@ ngx_hunk_t *ngx_create_hunk_after(ngx_pool_t *pool, ngx_hunk_t *hunk, int size) } +int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **ch, ngx_chain_t *in) +{ + ngx_chain_t *ce, **le; + + le = ch; + + for (ce = *ch; ce; ce = ce->next) { + le = &ce->next; + } + + while (in) { + ngx_test_null(ce, ngx_alloc_chain_entry(pool), NGX_ERROR); + + ce->hunk = in->hunk; + ce->next = NULL; + *le = ce; + le = &ce->next; + in = in->next; + } + + return NGX_OK; +} + + void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, ngx_chain_t **out) { diff --git a/src/core/ngx_hunk.h b/src/core/ngx_hunk.h index 7da054e55..fbaad5ee1 100644 --- a/src/core/ngx_hunk.h +++ b/src/core/ngx_hunk.h @@ -86,5 +86,10 @@ ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size, chain->next = NULL; \ } while (0); +int ngx_chain_add_copy(ngx_pool_t *pool, ngx_chain_t **ch, ngx_chain_t *in); +void ngx_chain_update_chains(ngx_chain_t **free, ngx_chain_t **busy, + ngx_chain_t **out); + + #endif /* _NGX_HUNK_H_INCLUDED_ */ diff --git a/src/core/ngx_modules.c b/src/core/ngx_modules.c index 0e33b96b2..8d3c5c075 100644 --- a/src/core/ngx_modules.c +++ b/src/core/ngx_modules.c @@ -33,6 +33,7 @@ extern ngx_module_t ngx_http_output_filter_module; extern ngx_module_t ngx_http_header_filter_module; extern ngx_module_t ngx_http_chunked_filter_module; +extern ngx_module_t ngx_http_gzip_filter_module; extern ngx_module_t ngx_http_range_filter_module; extern ngx_module_t ngx_http_charset_filter_module; @@ -81,7 +82,7 @@ ngx_module_t *ngx_modules[] = { &ngx_http_header_filter_module, &ngx_http_chunked_filter_module, - /* &ngx_http_gzip_filter_module, */ + &ngx_http_gzip_filter_module, &ngx_http_range_filter_module, /* &ngx_http_ssi_filter_module, */ &ngx_http_charset_filter_module, |
