comparison src/http/modules/ngx_http_fastcgi_module.c @ 1142:e479e0b02e5a

fix "zero size buf" if request body file is multiple of 32K and FastCGI is used
author Igor Sysoev <igor@sysoev.ru>
date Wed, 21 Mar 2007 13:30:24 +0000
parents 2d978e1443ed
children 863c3490103e
comparison
equal deleted inserted replaced
1141:2b16d3959c2b 1142:e479e0b02e5a
721 721
722 if (body->buf->in_file) { 722 if (body->buf->in_file) {
723 b->file_pos = file_pos; 723 b->file_pos = file_pos;
724 file_pos += 32 * 1024; 724 file_pos += 32 * 1024;
725 725
726 if (file_pos > body->buf->file_last) { 726 if (file_pos >= body->buf->file_last) {
727 file_pos = body->buf->file_last; 727 file_pos = body->buf->file_last;
728 next = 1; 728 next = 1;
729 } 729 }
730 730
731 b->file_last = file_pos; 731 b->file_last = file_pos;
733 733
734 } else { 734 } else {
735 b->pos = pos; 735 b->pos = pos;
736 pos += 32 * 1024; 736 pos += 32 * 1024;
737 737
738 if (pos > body->buf->last) { 738 if (pos >= body->buf->last) {
739 pos = body->buf->last; 739 pos = body->buf->last;
740 next = 1; 740 next = 1;
741 } 741 }
742 742
743 b->last = pos; 743 b->last = pos;