summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBrian Pane <brianp@apache.org>2002-06-19 09:21:45 +0200
committerBrian Pane <brianp@apache.org>2002-06-19 09:21:45 +0200
commitc6f413d754987c7e5a2fdc7cf16b10757dc245fb (patch)
treecd89c702b7aa553f557111698f97497eaf007603 /modules
parentFix grammar. (diff)
downloadapache2-c6f413d754987c7e5a2fdc7cf16b10757dc245fb.tar.xz
apache2-c6f413d754987c7e5a2fdc7cf16b10757dc245fb.zip
Fixed the EOS handling for partial SSI directives at the end of
brigades. (This was causing us to produce no output, not even an HTTP response header, for a document containing an unterminated "<!--#" directive git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95803 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r--modules/filters/mod_include.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/filters/mod_include.c b/modules/filters/mod_include.c
index 3c208efcb3..4b50c883b9 100644
--- a/modules/filters/mod_include.c
+++ b/modules/filters/mod_include.c
@@ -3239,6 +3239,20 @@ static apr_status_t send_parsed_content(apr_bucket_brigade **bb,
/* Set aside tag, pass pre-tag... */
tag_and_after = apr_brigade_split(*bb, ctx->head_start_bucket);
ap_save_brigade(f, &ctx->ssi_tag_brigade, &tag_and_after, r->pool);
+ if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(ctx->ssi_tag_brigade))) {
+ apr_bucket *new_eos;
+ /* Make sure there's no EOS at the end of the set-aside
+ * brigade, because we may later prepend it to some
+ * other brigade
+ */
+ APR_BUCKET_REMOVE(APR_BRIGADE_LAST(ctx->ssi_tag_brigade));
+
+ /* And put an EOS on the brigade that we're about to pass
+ * to the next filter.
+ */
+ new_eos = apr_bucket_eos_create((*bb)->bucket_alloc);
+ APR_BRIGADE_INSERT_TAIL(*bb, new_eos);
+ }
rv = ap_pass_brigade(f->next, *bb);
if (rv != APR_SUCCESS) {
return rv;