From: Jim Jagielski Date: Thu, 21 Jan 2016 18:41:21 +0000 (+0000) Subject: revert X-Git-Tag: 2.5.0-alpha~2321 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df23b8a678810e216aac3e0ec4fe2d535b4da126;p=thirdparty%2Fapache%2Fhttpd.git revert git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726057 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index bbe40bb2c8d..036e3e0b362 100644 --- a/CHANGES +++ b/CHANGES @@ -19,9 +19,6 @@ Changes with Apache 2.5.0 APR_TIMEUP and preserving connection state for later retry. [Stefan Eissing] - *) ap_expr: expression support for r->kept_body if it exists. - [Jim Jagielski] - *) mod_http2: bytes read/written on slave connections are reported via the optional mod_logio functions. Fixes PR 58871. diff --git a/docs/manual/expr.xml b/docs/manual/expr.xml index 841c06a8163..257eb1d9a4c 100644 --- a/docs/manual/expr.xml +++ b/docs/manual/expr.xml @@ -501,10 +501,6 @@ listfunction ::= listfuncname "(" word ")" Lookup operating system environment variable note Lookup request note - kept_body - Lookup response body if available in r->kept_body. Note: - function argument is required but ignored. - env Return first match of note, reqenv, osenv diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index 2a995e551b5..5a8f207eadc 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -1049,30 +1049,6 @@ static const char *req_table_func(ap_expr_eval_ctx_t *ctx, const void *data, return apr_table_get(t, arg); } -static const char *kb_func(ap_expr_eval_ctx_t *ctx, const void *data, - const char *arg) -{ - apr_off_t length; - apr_size_t len; - apr_status_t rv; - char *buf; - - if (!ctx->r || !ctx->r->kept_body) - return ""; - - rv = apr_brigade_length(ctx->r->kept_body, 1, &length); - len = (apr_size_t)length;; - if (rv != APR_SUCCESS || len == 0) - return ""; - - buf = apr_palloc(ctx->r->pool, len+1); - rv = apr_brigade_flatten(ctx->r->kept_body, buf, &len); - if (rv != APR_SUCCESS) - return ""; - buf[len] = '\0'; /* ensure */ - return (const char*)buf; -} - static const char *env_func(ap_expr_eval_ctx_t *ctx, const void *data, const char *arg) { @@ -1809,7 +1785,6 @@ static const struct expr_provider_single string_func_providers[] = { { unbase64_func, "unbase64", NULL, 0 }, { sha1_func, "sha1", NULL, 0 }, { md5_func, "md5", NULL, 0 }, - { kb_func, "kept_body", NULL, 0 }, #if APR_VERSION_AT_LEAST(1,6,0) { ldap_func, "ldap", NULL, 0 }, #endif