httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1422586 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS docs/manual/ docs/manual/expr.xml server/util_expr_eval.c
Date Sun, 16 Dec 2012 14:46:46 GMT
Author: rjung
Date: Sun Dec 16 14:46:45 2012
New Revision: 1422586

URL: http://svn.apache.org/viewvc?rev=1422586&view=rev
Log:
ap_expr: Add req_novary function that allows HTTP header lookups
without adding the name to the Vary header.

Submitted by: sf
Backported by: rjung
Reviewed by: rjung, jailletc36, sf

Backport of r1403483 from trunk.

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/CHANGES
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/docs/manual/   (props changed)
    httpd/httpd/branches/2.4.x/docs/manual/expr.xml
    httpd/httpd/branches/2.4.x/server/util_expr_eval.c

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1403483

Modified: httpd/httpd/branches/2.4.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/CHANGES?rev=1422586&r1=1422585&r2=1422586&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.4.x/CHANGES [utf-8] Sun Dec 16 14:46:45 2012
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.4
 
+  *) ap_expr: Add req_novary function that allows HTTP header lookups
+     without adding the name to the Vary header. [Stefan Fritsch]
+
   *) mod_slotmem_*: Add in new fgrab() function which forces a grab and
      slot allocation on a specified slot. Allow for clearing of inuse
      array. [Jim Jagielski]

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1422586&r1=1422585&r2=1422586&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Sun Dec 16 14:46:45 2012
@@ -91,17 +91,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * ap_expr: Add req_novary function that allows HTTP header lookups
-     without adding the name to the Vary header
-     Not critical for 2.4.4.
-     trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1403483
-     2.4.x patch: Trunk patch works.
-     +1: rjung, jailletc36, sf
-     jailletc36: IMO, a line in CHANGES should be added to reflect the new functionality
-                 and maybe the doc should tell in which version of apache it has been
-                 introduced
-     rjung: Will include a CHANGES item and a compatibility note in expr.xml.
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]

Propchange: httpd/httpd/branches/2.4.x/docs/manual/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk/docs/manual:r1403483

Modified: httpd/httpd/branches/2.4.x/docs/manual/expr.xml
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/docs/manual/expr.xml?rev=1422586&r1=1422585&r2=1422586&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/docs/manual/expr.xml (original)
+++ httpd/httpd/branches/2.4.x/docs/manual/expr.xml Sun Dec 16 14:46:45 2012
@@ -142,7 +142,9 @@ listfunction ::= listfuncname "<strong>(
     <code>req</code> <a href="#functions">function</a>. Using these
     variables may cause the header name to be added to the Vary
     header of the HTTP response, except where otherwise noted for the
-    directive accepting the expression.</p>
+    directive accepting the expression. The <code>req_novary</code>
+    <a href="#functions">function</a> may be used to circumvent this
+    behavior.</p>
 
     <table border="1" style="zebra">
     <columnspec><column width="1"/></columnspec>
@@ -434,6 +436,9 @@ listfunction ::= listfuncname "<strong>(
     <tr><td><code>req</code>, <code>http</code></td>
         <td>Get HTTP request header; header names may be added to the Vary
             header, see below</td><td></td></tr>
+    <tr><td><code>req_novary</code></td>
+        <td>Same as <code>req</code>, but header names will not be added
to the
+            Vary header</td><td></td></tr>
     <tr><td><code>resp</code></td>
         <td>Get HTTP response header</td><td></td></tr>
     <tr><td><code>reqenv</code></td>
@@ -468,7 +473,8 @@ listfunction ::= listfuncname "<strong>(
     <p>When the functions <code>req</code> or <code>http</code>
are used,
     the header name will automatically be added to the Vary header of the
     HTTP response, except where otherwise noted for the directive accepting
-    the expression.</p>
+    the expression. The <code>req_novary</code> function can be used to
+    prevent names from being added to the Vary header.</p>
 
     <p>In addition to string-valued functions, there are also list-valued functions
which
     take one string as argument and return a wordlist, i.e. a list of strings. The wordlist

Modified: httpd/httpd/branches/2.4.x/server/util_expr_eval.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/server/util_expr_eval.c?rev=1422586&r1=1422585&r2=1422586&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/server/util_expr_eval.c (original)
+++ httpd/httpd/branches/2.4.x/server/util_expr_eval.c Sun Dec 16 14:46:45 2012
@@ -968,6 +968,8 @@ static const char *req_table_func(ap_exp
         t = ctx->r->notes;
     else if (name[3] == 'e')        /* reqenv */
         t = ctx->r->subprocess_env;
+    else if (name[3] == '_')        /* req_novary */
+        t = ctx->r->headers_in;
     else {                          /* req, http */
         t = ctx->r->headers_in;
         add_vary(ctx, arg);
@@ -1566,6 +1568,7 @@ static const struct expr_provider_single
     { req_table_func,       "http",           NULL, 0 },
     { req_table_func,       "note",           NULL, 0 },
     { req_table_func,       "reqenv",         NULL, 0 },
+    { req_table_func,       "req_novary",     NULL, 0 },
     { tolower_func,         "tolower",        NULL, 0 },
     { toupper_func,         "toupper",        NULL, 0 },
     { escape_func,          "escape",         NULL, 0 },



Mime
View raw message