Mercurial > hg > nginx
comparison src/http/modules/ngx_http_fastcgi_module.c @ 6512:b5734248d5e7
FastCGI: skip special bufs in buffered request body chain.
This prevents forming empty records out of such buffers. Particularly it fixes
double end-of-stream records with chunked transfer encoding, or when HTTP/2 is
used and the END_STREAM flag has been sent without data. In both cases there
is an empty buffer at the end of the request body chain with the "last_buf"
flag set.
The canonical libfcgi, as well as php implementation, tolerates such records,
while the HHVM parser is more strict and drops the connection (ticket #950).
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 11 Apr 2016 18:42:34 +0300 |
parents | f01ab2dbcfdc |
children | 1d0e03db9f8e |
comparison
equal
deleted
inserted
replaced
6511:640288d0e1bc | 6512:b5734248d5e7 |
---|---|
1175 pos = NULL; | 1175 pos = NULL; |
1176 #endif | 1176 #endif |
1177 | 1177 |
1178 while (body) { | 1178 while (body) { |
1179 | 1179 |
1180 if (ngx_buf_special(body->buf)) { | |
1181 body = body->next; | |
1182 continue; | |
1183 } | |
1184 | |
1180 if (body->buf->in_file) { | 1185 if (body->buf->in_file) { |
1181 file_pos = body->buf->file_pos; | 1186 file_pos = body->buf->file_pos; |
1182 | 1187 |
1183 } else { | 1188 } else { |
1184 pos = body->buf->pos; | 1189 pos = body->buf->pos; |