aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_fastcgi_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_fastcgi_module.c')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c57
1 files changed, 8 insertions, 49 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index 5e8ef40c1..6134c92d3 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -1356,11 +1356,7 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
}
} else {
- if (f->padding) {
- f->state = ngx_http_fastcgi_st_padding;
- } else {
- f->state = ngx_http_fastcgi_st_version;
- }
+ f->state = ngx_http_fastcgi_st_padding;
}
continue;
@@ -1597,11 +1593,7 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
f->length -= u->buffer.pos - start;
if (f->length == 0) {
- if (f->padding) {
- f->state = ngx_http_fastcgi_st_padding;
- } else {
- f->state = ngx_http_fastcgi_st_version;
- }
+ f->state = ngx_http_fastcgi_st_padding;
}
if (rc == NGX_HTTP_PARSE_HEADER_DONE) {
@@ -1696,12 +1688,7 @@ ngx_http_fastcgi_input_filter(ngx_event_pipe_t *p, ngx_buf_t *buf)
}
if (f->type == NGX_HTTP_FASTCGI_STDOUT && f->length == 0) {
-
- if (f->padding) {
- f->state = ngx_http_fastcgi_st_padding;
- } else {
- f->state = ngx_http_fastcgi_st_version;
- }
+ f->state = ngx_http_fastcgi_st_padding;
if (!flcf->keep_conn) {
p->upstream_done = 1;
@@ -1714,12 +1701,7 @@ ngx_http_fastcgi_input_filter(ngx_event_pipe_t *p, ngx_buf_t *buf)
}
if (f->type == NGX_HTTP_FASTCGI_END_REQUEST) {
-
- if (f->padding) {
- f->state = ngx_http_fastcgi_st_padding;
- } else {
- f->state = ngx_http_fastcgi_st_version;
- }
+ f->state = ngx_http_fastcgi_st_padding;
p->upstream_done = 1;
@@ -1730,7 +1712,7 @@ ngx_http_fastcgi_input_filter(ngx_event_pipe_t *p, ngx_buf_t *buf)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, p->log, 0,
"http fastcgi sent end request");
- break;
+ continue;
}
}
@@ -1789,11 +1771,7 @@ ngx_http_fastcgi_input_filter(ngx_event_pipe_t *p, ngx_buf_t *buf)
m + 1 - msg, msg);
} else {
- if (f->padding) {
- f->state = ngx_http_fastcgi_st_padding;
- } else {
- f->state = ngx_http_fastcgi_st_version;
- }
+ f->state = ngx_http_fastcgi_st_padding;
}
continue;
@@ -1852,33 +1830,14 @@ ngx_http_fastcgi_input_filter(ngx_event_pipe_t *p, ngx_buf_t *buf)
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, p->log, 0,
"input buf #%d %p", b->num, b->pos);
- if (f->pos + f->length < f->last) {
-
- if (f->padding) {
- f->state = ngx_http_fastcgi_st_padding;
- } else {
- f->state = ngx_http_fastcgi_st_version;
- }
-
+ if (f->pos + f->length <= f->last) {
+ f->state = ngx_http_fastcgi_st_padding;
f->pos += f->length;
b->last = f->pos;
continue;
}
- if (f->pos + f->length == f->last) {
-
- if (f->padding) {
- f->state = ngx_http_fastcgi_st_padding;
- } else {
- f->state = ngx_http_fastcgi_st_version;
- }
-
- b->last = f->last;
-
- break;
- }
-
f->length -= f->last - f->pos;
b->last = f->last;