aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_fastcgi_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-01-25 12:27:35 +0000
committerIgor Sysoev <igor@sysoev.ru>2005-01-25 12:27:35 +0000
commite5a222c6fef26b51d956c35530178837c60bf8c4 (patch)
tree65dafe2f85fe2b09b82d3efd2abe2b43720a1f4e /src/http/modules/ngx_http_fastcgi_handler.c
parent4f06a9709164123e7d8ccbd6fa723da387a9a86c (diff)
downloadnginx-release-0.1.16.tar.gz
nginx-release-0.1.16.zip
nginx-0.1.16-RELEASE importrelease-0.1.16
*) Bugfix: if the response were transferred by chunks, then on the HEAD request the final chunk was issued. *) Bugfix: the "Connection: keep-alive" header were issued, even if the keepalive_timeout directive forbade the keep-alive use. *) Bugfix: the errors in the ngx_http_fastcgi_module caused the segmentation faults. *) Bugfix: the compressed response encrypted by SSL may not transferred complete. *) Bugfix: the TCP-specific TCP_NODELAY, TCP_NOPSUH, and TCP_CORK options, are not used for the unix domain sockets. *) Feature: the rewrite directive supports the arguments rewriting. *) Bugfix: the response code 400 was returned for the POST request with the "Content-Length: 0" header; the bug had appeared in 0.1.14.
Diffstat (limited to 'src/http/modules/ngx_http_fastcgi_handler.c')
-rw-r--r--src/http/modules/ngx_http_fastcgi_handler.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_handler.c b/src/http/modules/ngx_http_fastcgi_handler.c
index 41efa0bb9..9f5016a45 100644
--- a/src/http/modules/ngx_http_fastcgi_handler.c
+++ b/src/http/modules/ngx_http_fastcgi_handler.c
@@ -1385,7 +1385,7 @@ static ngx_int_t ngx_http_fastcgi_input_filter(ngx_event_pipe_t *p,
ngx_buf_t *buf)
{
ngx_int_t rc;
- ngx_buf_t *b;
+ ngx_buf_t *b, **prev;
ngx_str_t line;
ngx_chain_t *cl;
ngx_http_request_t *r;
@@ -1399,6 +1399,7 @@ static ngx_int_t ngx_http_fastcgi_input_filter(ngx_event_pipe_t *p,
f = ngx_http_get_module_ctx(r, ngx_http_fastcgi_module);
b = NULL;
+ prev = &buf->shadow;
f->pos = buf->pos;
f->last = buf->last;
@@ -1510,11 +1511,14 @@ static ngx_int_t ngx_http_fastcgi_input_filter(ngx_event_pipe_t *p,
ngx_memzero(b, sizeof(ngx_buf_t));
b->pos = f->pos;
- b->shadow = buf;
+ b->start = buf->start;
+ b->end = buf->end;
b->tag = p->tag;
b->temporary = 1;
b->recycled = 1;
- buf->shadow = b;
+
+ *prev = b;
+ prev = &b->shadow;
if (!(cl = ngx_alloc_chain_link(p->pool))) {
return NGX_ERROR;
@@ -1523,6 +1527,8 @@ static ngx_int_t ngx_http_fastcgi_input_filter(ngx_event_pipe_t *p,
cl->buf = b;
cl->next = NULL;
+ /* STUB */ b->num = buf->num;
+
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, p->log, 0, "input buf #%d", b->num);
ngx_chain_add_link(p->in, p->last_in, cl);
@@ -1563,7 +1569,16 @@ static ngx_int_t ngx_http_fastcgi_input_filter(ngx_event_pipe_t *p,
}
if (b) {
+ b->shadow = buf;
b->last_shadow = 1;
+
+ return NGX_OK;
+ }
+
+ /* there is no data record in the buf, add it to free chain */
+
+ if (ngx_event_pipe_add_free_buf(p, buf) != NGX_OK) {
+ return NGX_ERROR;
}
return NGX_OK;