Commit 4847d471 authored by Jeff Trawick's avatar Jeff Trawick
Browse files

Merge r1734947, 1735952 from trunk:

(and adjust version info in CHANGES, ap_mmn comment, core.xml)

core: New CGIVar directive can configure REQUEST_URI to represent the
current URI being processed instead of always the original request.

Submitted by: trawick
Reviewed by: ylavic, jim


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

Changes with Apache 2.4.21

  *) core: New CGIVar directive can configure REQUEST_URI to represent the
     current URI being processed instead of always the original request.
     [Jeff Trawick]

  *) scoreboard/status: Restore behavior of showing workers' previous Client,
     VHost and Request values when idle, like in 2.4.18 and earlier. 

+0 −16
Original line number Diff line number Diff line
@@ -114,22 +114,6 @@ RELEASE SHOWSTOPPERS:
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
  [ start all new proposals below, under PATCHES PROPOSED. ]

  *) CGIVar for controlling building of REQUEST_URI (and future uses)
     As mentioned on dev@:
     * This is intended to replace existing methods of configuring how various
       CGI vars should be built over the long term, though only REQUEST_URI is
       handled for now.
     * If the mechanism should be usable by third-party modules for its own
       concerns, a check for recognized-envvar can be removed from the command
       processor and the rest of the code will let the third-party module do
       the right thing since the rule for a var is a character string in a table,
       not a separate core_dir_config flag with enumerated values.
     Trunk patch: r1734947, 1735952
     2.4.x patch: https://emptyhammock.com/media/downloads/CGIVar-to-2.4.x.txt
       Bad Jeff: The MMN change was missing originally, same patch updated :(
     +1: trawick, ylavic, jim
     trawick: If someone has an idea to make this more palatable, I'm all ears.


PATCHES PROPOSED TO BACKPORT FROM TRUNK:
  [ New proposals should be added at the end of the list ]
+26 −0
Original line number Diff line number Diff line
@@ -597,6 +597,32 @@ variables</description>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>CGIVar</name>
<description>Controls how some CGI variables are set</description>
<syntax>CGIVar <var>variable</var> <var>rule</var></syntax>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>FileInfo</override>
<compatibility>Available in Apache HTTP Server 2.4.21 and later</compatibility>

<usage>
  <p>This directive controls how some CGI variables are set.</p>

  <p><strong>REQUEST_URI</strong> rules:</p>
  <dl>
    <dt><code>original-uri</code> (default)</dt>
    <dd>The value is taken from the original request line, and will not
    reflect internal redirects or subrequests which change the requested
    resource.</dd>
    <dt><code>current-uri</code></dt>
    <dd>The value reflects the resource currently being processed,
    which may be different than the original request from the client
    due to internal redirects or subrequests.</dd>
  </dl>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>ContentDigest</name>
<description>Enables the generation of <code>Content-MD5</code> HTTP Response
+3 −2
Original line number Diff line number Diff line
@@ -460,7 +460,7 @@
 *                          ap_get_protocol(). Add HTTP_MISDIRECTED_REQUEST.
 *                          Added ap_parse_token_list_strict() to httpd.h
 * 20120211.52 (2.4.17-dev) Add master conn_rec* member in conn_rec.
 * 20120211.53 (2.4.19-dev) Add epxr_hander to core_dir_config.
 * 20120211.53 (2.4.19-dev) Add expr_handler to core_dir_config.
 * 20120211.54 (2.4.19-dev) Add ap_proxy_buckets_lifetime_transform and
 *                          ap_proxy_transfer_between_connections to
 *                          mod_proxy.h
@@ -471,6 +471,7 @@
 * 20120211.56 (2.4.19-dev) Split useragent_host from the conn_rec into
 *                          the request_rec, with ap_get_useragent_host()
 * 20120211.57 (2.4.19-dev) Add mod_ssl_openssl.h and OpenSSL-specific hooks
 * 20120211.58 (2.4.21-dev) Add cgi_var_rules to core_dir_config.
 */

#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
@@ -478,7 +479,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20120211
#endif
#define MODULE_MAGIC_NUMBER_MINOR 57                   /* 0...n */
#define MODULE_MAGIC_NUMBER_MINOR 58                   /* 0...n */

/**
 * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
+3 −0
Original line number Diff line number Diff line
@@ -669,6 +669,9 @@ typedef struct {
    unsigned int cgi_pass_auth : 2;
    unsigned int qualify_redirect_url :2;
    ap_expr_info_t  *expr_handler;         /* forced with SetHandler */

    /** Table of rules for building CGI variables, NULL if none configured */
    apr_hash_t *cgi_var_rules;
} core_dir_config;

/* macro to implement off by default behaviour */
Loading