comparison src/http/modules/ngx_http_ssi_filter_module.c @ 599:53f5f04a64b8 NGINX_0_8_45

nginx 0.8.45 *) Feature: ngx_http_xslt_filter improvements. Thanks to Laurence Rowe. *) Bugfix: SSI response might be truncated after include with wait="yes"; the bug had appeared in 0.7.25. Thanks to Maxim Dounin. *) Bugfix: the "listen" directive did not support the "setfib=0" parameter.
author Igor Sysoev <http://sysoev.ru>
date Tue, 13 Jul 2010 00:00:00 +0400
parents c456a023113c
children b4dcae568a2a
comparison
equal deleted inserted replaced
598:565a8b8fdad5 599:53f5f04a64b8
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)