Mercurial > hg > nginx
comparison src/http/modules/ngx_http_ssi_filter_module.c @ 3680:0d492ae53a57
update r->buffered after processing SSI command,
the bug has been probably introduced in r2378
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 07 Jul 2010 10:17:19 +0000 |
parents | ac33852faaac |
children | e7798b5e990a |
comparison
equal
deleted
inserted
replaced
3679:5e550bad9aa6 | 3680:0d492ae53a57 |
---|---|
68 } ngx_http_ssi_state_e; | 68 } ngx_http_ssi_state_e; |
69 | 69 |
70 | 70 |
71 static ngx_int_t ngx_http_ssi_output(ngx_http_request_t *r, | 71 static ngx_int_t ngx_http_ssi_output(ngx_http_request_t *r, |
72 ngx_http_ssi_ctx_t *ctx); | 72 ngx_http_ssi_ctx_t *ctx); |
73 static void ngx_http_ssi_buffered(ngx_http_request_t *r, | |
74 ngx_http_ssi_ctx_t *ctx); | |
73 static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r, | 75 static ngx_int_t ngx_http_ssi_parse(ngx_http_request_t *r, |
74 ngx_http_ssi_ctx_t *ctx); | 76 ngx_http_ssi_ctx_t *ctx); |
75 static ngx_str_t *ngx_http_ssi_get_variable(ngx_http_request_t *r, | 77 static ngx_str_t *ngx_http_ssi_get_variable(ngx_http_request_t *r, |
76 ngx_str_t *name, ngx_uint_t key); | 78 ngx_str_t *name, ngx_uint_t key); |
77 static ngx_int_t ngx_http_ssi_evaluate_string(ngx_http_request_t *r, | 79 static ngx_int_t ngx_http_ssi_evaluate_string(ngx_http_request_t *r, |
791 if (rc == NGX_OK) { | 793 if (rc == NGX_OK) { |
792 continue; | 794 continue; |
793 } | 795 } |
794 | 796 |
795 if (rc == NGX_DONE || rc == NGX_AGAIN || rc == NGX_ERROR) { | 797 if (rc == NGX_DONE || rc == NGX_AGAIN || rc == NGX_ERROR) { |
798 ngx_http_ssi_buffered(r, ctx); | |
796 return rc; | 799 return rc; |
797 } | 800 } |
798 } | 801 } |
799 | 802 |
800 | 803 |
943 cl->next = ctx->free; | 946 cl->next = ctx->free; |
944 ctx->free = cl; | 947 ctx->free = cl; |
945 } | 948 } |
946 } | 949 } |
947 | 950 |
951 ngx_http_ssi_buffered(r, ctx); | |
952 | |
953 return rc; | |
954 } | |
955 | |
956 | |
957 static void | |
958 ngx_http_ssi_buffered(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx) | |
959 { | |
948 if (ctx->in || ctx->buf) { | 960 if (ctx->in || ctx->buf) { |
949 r->buffered |= NGX_HTTP_SSI_BUFFERED; | 961 r->buffered |= NGX_HTTP_SSI_BUFFERED; |
950 | 962 |
951 } else { | 963 } else { |
952 r->buffered &= ~NGX_HTTP_SSI_BUFFERED; | 964 r->buffered &= ~NGX_HTTP_SSI_BUFFERED; |
953 } | 965 } |
954 | |
955 return rc; | |
956 } | 966 } |
957 | 967 |
958 | 968 |
959 static ngx_int_t | 969 static ngx_int_t |
960 ngx_http_ssi_parse(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx) | 970 ngx_http_ssi_parse(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx) |