Commit aaeaf78b authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Merge r1737476 from trunk:

Add the <!--#comment ... --> syntax.
Idea from Rob.
Submitted by: jailletc36
Reviewed/backported by: jim


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1747054 13f79535-47bb-0310-9956-ffa450edef68
parent 09635642
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@

Changes with Apache 2.4.21

  *) mod_include: add the <!--#comment ...> syntax in order to include comments
     in a SSI file. [Christophe Jaillet based on a suggestion from Rob]

  *) mod_http2: improved event handling for suspended streams, responses
     and window updates. [Stefan Eissing] 
     
+0 −5
Original line number Diff line number Diff line
@@ -114,11 +114,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]

 *) mod_include: add the <!--#comment ...> syntax in order to include comments
     in a SSI file.
     Trunk patch: http://svn.apache.org/r1737476
     2.4.x patch: trunk patch works (compatibility note to be adjusted)
     +1: jailletc36, gsmith, covener

 *) core: save a few bytes in conf pool.
     trunk patch: http://svn.apache.org/r1744980
+13 −0
Original line number Diff line number Diff line
@@ -110,6 +110,8 @@ Options +Includes

    <table border="1">
    <tr><th>Element</th><th>Description</th></tr>
    <tr><td><code><a href="#element.comment">comment</a></code></td>
        <td>SSI comment</td></tr>
    <tr><td><code><a href="#element.config">config</a></code></td>
        <td>configure output formats</td></tr>
    <tr><td><code><a href="#element.echo">echo</a></code></td>
@@ -134,6 +136,17 @@ Options +Includes
    <module>mod_cgi</module>, and will only be available if this
    module is loaded.</p>

    <section id="element.comment"><title>The comment Element</title>
      <p>This command doesn't output anything. Its only use is to
      add comments within a file. These comments are not printed.</p>

      <p>This syntax is available in version 2.5 and later.</p>

      <example>
      &lt;!--#comment Blah Blah Blah --&gt;
      </example>
    </section> <!-- /comment -->

    <section id="element.config"><title>The config Element</title>
      <p>This command controls various aspects of the parsing. The
      valid attributes are:</p>
+10 −0
Original line number Diff line number Diff line
@@ -1762,6 +1762,15 @@ static int find_file(request_rec *r, const char *directive, const char *tag,
    }
}

/*
 * <!--#comment blah blah blah ... -->
 */
static apr_status_t handle_comment(include_ctx_t *ctx, ap_filter_t *f,
                                   apr_bucket_brigade *bb)
{
    return APR_SUCCESS;
}

/*
 * <!--#include virtual|file="..." [onerror|virtual|file="..."] ... -->
 *
@@ -4160,6 +4169,7 @@ static int include_post_config(apr_pool_t *p, apr_pool_t *plog,
        ssi_pfn_register("endif", handle_endif);
        ssi_pfn_register("fsize", handle_fsize);
        ssi_pfn_register("config", handle_config);
        ssi_pfn_register("comment", handle_comment);
        ssi_pfn_register("include", handle_include);
        ssi_pfn_register("flastmod", handle_flastmod);
        ssi_pfn_register("printenv", handle_printenv);