diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2002-08-16 15:27:03 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2002-08-16 15:27:03 +0000 |
| commit | e0af1b89dcd100462a3195534b2f78a838ca85b5 (patch) | |
| tree | 9c9eb63c71b13cc9159209e39eb099c54c6cb6b1 /src/http/modules | |
| parent | 0c331d9f666b4f9be91009b7caea457e58a80779 (diff) | |
| download | nginx-e0af1b89dcd100462a3195534b2f78a838ca85b5.tar.gz nginx-e0af1b89dcd100462a3195534b2f78a838ca85b5.tar.bz2 | |
nginx-0.0.1-2002-08-16-19:27:03 import
Diffstat (limited to 'src/http/modules')
| -rw-r--r-- | src/http/modules/ngx_http_header_filter.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_header_filter.c b/src/http/modules/ngx_http_header_filter.c index 1742b8bfc..d24765446 100644 --- a/src/http/modules/ngx_http_header_filter.c +++ b/src/http/modules/ngx_http_header_filter.c @@ -12,11 +12,11 @@ static line http_codes[] = { - int ngx_http_header_filter(ngx_http_request_t *r) { int status; - ngx_hunk_t *h; + ngx_hunk_t *h; + ngx_chain_t *ch; ngx_test_null(h, ngx_get_hunk(r->pool, 1024, 0, 64), NGX_HTTP_FILTER_ERROR); @@ -51,5 +51,12 @@ int ngx_http_header_filter(ngx_http_request_t *r) h->pos.mem += sizeof(NGINX_VER); } *(h->pos.mem++) = CR; *(h->pos.mem++) = LF; - + + ngx_test_null(ch, ngx_palloc(r->pool, sizeof(ngx_chain_t)), + NGX_HTTP_FILTER_ERROR); + + ch->hunk = in->hunk; + ch->next = NULL; + + return ngx_http_write_filter(r, ch); } |
