I should have asked earlier: wouldn't it be more suitable to implement
to response body as a variable instead of a function?
When looking at server/util_expr_eval.c, I find request_var_names and
request_var_fn. The former is a list of variable names, and the latter
implements returning the values from parts of the request struct.
Returning the flattened kept_body should be a good fit there as well,
without having users wonder, why it is a function that requires an argument.
If we expect further response stuff coming, we could also clone
request_var_names and request_var_fn with new response_var_names and
response_var_fn and add the variable as the first and currently only one
there.
The variable name could be KEPT_BODY.
WDYT? I can also do the little reorg, but which way do we prefer?
Regards,
Rainer
Am 21.01.2016 um 14:54 schrieb [email protected]:
Author: jim
Date: Thu Jan 21 13:54:41 2016
New Revision: 1725949
URL: http://svn.apache.org/viewvc?rev=1725949&view=rev
Log:
Note that as a function, kept_body requires an argument,
but the value of that argument is completely moot.
Modified:
httpd/httpd/trunk/docs/manual/expr.xml
Modified: httpd/httpd/trunk/docs/manual/expr.xml
URL:
http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/manual/expr.xml?rev=1725949&r1=1725948&r2=1725949&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/manual/expr.xml (original)
+++ httpd/httpd/trunk/docs/manual/expr.xml Thu Jan 21 13:54:41 2016
@@ -502,7 +502,9 @@ listfunction ::= listfuncname "<strong>(
<tr><td><code>note</code></td>
<td>Lookup request note</td><td></td></tr>
<tr><td><code>kept_body</code></td>
- <td>Lookup response body if available in
<code>r->kept_body</code></td><td></td></tr>
+ <td>Lookup response body if available in <code>r->kept_body</code>.
<em>Note:</em>
+ function argument is required but ignored.
+ </td><td></td></tr>
<tr><td><code>env</code></td>
<td>Return first match of <code>note</code>, <code>reqenv</code>,
<code>osenv</code></td><td></td></tr>