MCPcopy Create free account
hub / github.com/apache/httpd / env2env

Function env2env

server/util_script.c:98–110  ·  view source on GitHub ↗

Sets variable @name in table @dest from r->subprocess_env if * available, else from the environment, else from @fallback if * non-NULL. */

Source from the content-addressed store, hash-verified

96 * available, else from the environment, else from @fallback if
97 * non-NULL. */
98static void env2env(apr_table_t *dest, request_rec *r,
99 const char *name, const char *fallback)
100{
101 const char *val;
102
103 val = apr_table_get(r->subprocess_env, name);
104 if (!val)
105 val = apr_pstrdup(r->pool, getenv(name));
106 if (!val)
107 val = apr_pstrdup(r->pool, fallback);
108 if (val)
109 apr_table_addn(dest, name, val);
110}
111
112AP_DECLARE(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t)
113{

Callers 1

ap_add_common_varsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected