Mercurial > hg > nginx
comparison src/http/modules/ngx_http_ssi_filter_module.c @ 3840:818d2603f52a stable-0.7
merge r3681:
update r->buffered after processing SSI command,
the bug has been probably introduced in r2378
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 14 Dec 2010 19:34:29 +0000 |
parents | 2d21e02fc01d |
children |
comparison
equal
deleted
inserted
replaced
3839:f706037d7f10 | 3840:818d2603f52a |
---|---|
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, |
795 if (rc == NGX_OK) { | 797 if (rc == NGX_OK) { |
796 continue; | 798 continue; |
797 } | 799 } |
798 | 800 |
799 if (rc == NGX_DONE || rc == NGX_AGAIN || rc == NGX_ERROR) { | 801 if (rc == NGX_DONE || rc == NGX_AGAIN || rc == NGX_ERROR) { |
802 ngx_http_ssi_buffered(r, ctx); | |
800 return rc; | 803 return rc; |
801 } | 804 } |
802 } | 805 } |
803 | 806 |
804 | 807 |
947 cl->next = ctx->free; | 950 cl->next = ctx->free; |
948 ctx->free = cl; | 951 ctx->free = cl; |
949 } | 952 } |
950 } | 953 } |
951 | 954 |
955 ngx_http_ssi_buffered(r, ctx); | |
956 | |
957 return rc; | |
958 } | |
959 | |
960 | |
961 static void | |
962 ngx_http_ssi_buffered(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx) | |
963 { | |
952 if (ctx->in || ctx->buf) { | 964 if (ctx->in || ctx->buf) { |
953 r->buffered |= NGX_HTTP_SSI_BUFFERED; | 965 r->buffered |= NGX_HTTP_SSI_BUFFERED; |
954 | 966 |
955 } else { | 967 } else { |
956 r->buffered &= ~NGX_HTTP_SSI_BUFFERED; | 968 r->buffered &= ~NGX_HTTP_SSI_BUFFERED; |
957 } | 969 } |
958 | |
959 return rc; | |
960 } | 970 } |
961 | 971 |
962 | 972 |
963 static ngx_int_t | 973 static ngx_int_t |
964 ngx_http_ssi_parse(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx) | 974 ngx_http_ssi_parse(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ctx) |