httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r1090234 - /httpd/httpd/trunk/server/util_expr_eval.c
Date Fri, 08 Apr 2011 13:13:36 GMT
Author: jorton
Date: Fri Apr  8 13:13:36 2011
New Revision: 1090234

URL: http://svn.apache.org/viewvc?rev=1090234&view=rev
Log:
* server/util_expr_eval.c (req_table_func): Try r->err_headers_out for
  response headers if given header is not found in r->headers_out
  (e.g. as with non-standard headers from CGI scripts).

Modified:
    httpd/httpd/trunk/server/util_expr_eval.c

Modified: httpd/httpd/trunk/server/util_expr_eval.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_eval.c?rev=1090234&r1=1090233&r2=1090234&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_eval.c (original)
+++ httpd/httpd/trunk/server/util_expr_eval.c Fri Apr  8 13:13:36 2011
@@ -761,8 +761,14 @@ static const char *req_table_func(ap_exp
     if (!ctx->r)
         return "";
 
-    if (name[2] == 's')             /* resp */
-        t = ctx->r->headers_out;
+    if (name[2] == 's') {           /* resp */
+        /* Try r->headers_out first, fall back on err_headers_out. */
+        const char *v = apr_table_get(ctx->r->headers_out, arg);
+        if (v) {
+            return v;
+        }
+        t = ctx->r->err_headers_out;
+    }        
     else if (name[0] == 'n')        /* notes */
         t = ctx->r->notes;
     else if (name[3] == 'e')        /* reqenv */



Mime
View raw message