/* lf delimited, colon split, comma seperated and
* null terminated list of HTTP_ vars
*/
- char **env = (char**) apr_table_elts(r->subprocess_env)->elts;
+ const char * const *env = (const char* const *) apr_table_elts(r->subprocess_env)->elts;
int nelts = 2 * apr_table_elts(r->subprocess_env)->nelts;
int i;
/* lf delimited, colon split, comma seperated and
* null terminated list of the raw request header
*/
- char **raw = (char**) apr_table_elts(r->headers_in)->elts;
+ const char * const *raw = (const char* const *) apr_table_elts(r->headers_in)->elts;
int nelts = 2 * apr_table_elts(r->headers_in)->nelts;
int i;
const apr_table_t *methods,
ap_text_header *body)
{
- apr_array_header_t *arr;
- apr_table_entry_t *elts;
+ const apr_array_header_t *arr;
+ const apr_table_entry_t *elts;
ap_xml_elem *child;
ap_xml_attr *attr;
char *s;
if (elem->first_child == NULL) {
/* show all supported methods */
arr = apr_table_elts(methods);
- elts = (apr_table_entry_t *) arr->elts;
+ elts = (const apr_table_entry_t *) arr->elts;
for (i = 0; i < arr->nelts; ++i) {
if (elts[i].key == NULL)
const char *dav_level;
char *allow;
char *s;
- apr_array_header_t *arr;
- apr_table_entry_t *elts;
+ const apr_array_header_t *arr;
+ const apr_table_entry_t *elts;
apr_table_t *methods = apr_table_make(r->pool, 12);
ap_text_header vsn_options = { 0 };
ap_text_header body = { 0 };
/* Generate the Allow header */
arr = apr_table_elts(methods);
- elts = (apr_table_entry_t *) arr->elts;
+ elts = (const apr_table_entry_t *) arr->elts;
text_size = 0;
/* first, compute total length */
if (ctx->flags & FLAG_PRINTING) {
ap_ssi_get_tag_and_value(ctx, &tag, &tag_val, 1);
if ((tag == NULL) && (tag_val == NULL)) {
- apr_array_header_t *arr = apr_table_elts(r->subprocess_env);
- apr_table_entry_t *elts = (apr_table_entry_t *)arr->elts;
+ const apr_array_header_t *arr = apr_table_elts(r->subprocess_env);
+ const apr_table_entry_t *elts = (const apr_table_entry_t *)arr->elts;
int i;
const char *key_text, *val_text;
apr_size_t k_len, v_len, t_wrt;
char *dbuf, const char *sbuf, apr_file_t *script_in,
apr_file_t *script_err)
{
- apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
- apr_table_entry_t *hdrs = (apr_table_entry_t *) hdrs_arr->elts;
+ const apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
+ const apr_table_entry_t *hdrs = (const apr_table_entry_t *) hdrs_arr->elts;
char argsbuffer[HUGE_STRING_LEN];
apr_file_t *f = NULL;
int i;
apr_file_puts("%response\n", f);
hdrs_arr = apr_table_elts(r->err_headers_out);
- hdrs = (apr_table_entry_t *) hdrs_arr->elts;
+ hdrs = (const apr_table_entry_t *) hdrs_arr->elts;
for (i = 0; i < hdrs_arr->nelts; ++i) {
if (!hdrs[i].key)
static int log_script(request_rec *r, cgid_server_conf * conf, int ret,
char *dbuf, const char *sbuf, apr_file_t *script_in, apr_file_t *script_err)
{
- apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
- apr_table_entry_t *hdrs = (apr_table_entry_t *) hdrs_arr->elts;
+ const apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
+ const apr_table_entry_t *hdrs = (apr_table_entry_t *) hdrs_arr->elts;
char argsbuffer[HUGE_STRING_LEN];
apr_file_t *f = NULL;
int i;
apr_file_puts("%response\n", f);
hdrs_arr = apr_table_elts(r->err_headers_out);
- hdrs = (apr_table_entry_t *) hdrs_arr->elts;
+ hdrs = (const apr_table_entry_t *) hdrs_arr->elts;
for (i = 0; i < hdrs_arr->nelts; ++i) {
if (!hdrs[i].key)
static apr_table_t *rename_original_env(apr_pool_t *p, apr_table_t *t)
{
- apr_array_header_t *env_arr = apr_table_elts(t);
- apr_table_entry_t *elts = (apr_table_entry_t *) env_arr->elts;
+ const apr_array_header_t *env_arr = apr_table_elts(t);
+ const apr_table_entry_t *elts = (const apr_table_entry_t *) env_arr->elts;
apr_table_t *new = apr_table_make(p, env_arr->nalloc);
int i;
static char *lookup_header(request_rec *r, const char *name)
{
- apr_array_header_t *hdrs_arr;
- apr_table_entry_t *hdrs;
+ const apr_array_header_t *hdrs_arr;
+ const apr_table_entry_t *hdrs;
int i;
hdrs_arr = apr_table_elts(r->headers_in);
- hdrs = (apr_table_entry_t *)hdrs_arr->elts;
+ hdrs = (const apr_table_entry_t *)hdrs_arr->elts;
for (i = 0; i < hdrs_arr->nelts; ++i) {
if (hdrs[i].key == NULL) {
continue;
env_dir_config_rec *add = addv;
env_dir_config_rec *res = apr_palloc(p, sizeof(*res));
- apr_table_entry_t *elts;
- apr_array_header_t *arr;
+ const apr_table_entry_t *elts;
+ const apr_array_header_t *arr;
int i;
res->unsetenv = NULL;
arr = apr_table_elts(add->unsetenv);
- elts = (apr_table_entry_t *)arr->elts;
+ elts = (const apr_table_entry_t *)arr->elts;
for (i = 0; i < arr->nelts; ++i) {
apr_table_unset(res->vars, elts[i].key);
}
arr = apr_table_elts(add->vars);
- elts = (apr_table_entry_t *)arr->elts;
+ elts = (const apr_table_entry_t *)arr->elts;
for (i = 0; i < arr->nelts; ++i) {
apr_table_setn(res->vars, elts[i].key, elts[i].val);
{
sei_cfg_rec *sconf;
sei_entry *entries;
- apr_table_entry_t *elts;
+ const apr_table_entry_t *elts;
const char *val;
int i, j;
char *last_name;
* the headers_in until we find a match or run out of
* headers.
*/
- apr_array_header_t *arr = apr_table_elts(r->headers_in);
- elts = (apr_table_entry_t *) arr->elts;
+ const apr_array_header_t *arr = apr_table_elts(r->headers_in);
+ elts = (const apr_table_entry_t *) arr->elts;
val = NULL;
for (j = 0; j < arr->nelts; ++j) {
if (!ap_regexec(b->pnamereg, elts[j].key, 0, NULL, 0)) {
}
if (!ap_regexec(b->preg, val, 0, NULL, 0)) {
- apr_array_header_t *arr = apr_table_elts(b->features);
- elts = (apr_table_entry_t *) arr->elts;
+ const apr_array_header_t *arr = apr_table_elts(b->features);
+ elts = (const apr_table_entry_t *) arr->elts;
for (j = 0; j < arr->nelts; ++j) {
if (!strcmp(elts[j].val, "!")) {
char buffer[HUGE_STRING_LEN];
char *buf;
apr_bucket *e;
- apr_array_header_t *headers_in_array;
- apr_table_entry_t *headers_in;
+ const apr_array_header_t *headers_in_array;
+ const apr_table_entry_t *headers_in;
int counter;
/*
* Send the HTTP/1.1 request to the remote server
/* send request headers */
headers_in_array = apr_table_elts(r->headers_in);
- headers_in = (apr_table_entry_t *) headers_in_array->elts;
+ headers_in = (const apr_table_entry_t *) headers_in_array->elts;
for (counter = 0; counter < headers_in_array->nelts; counter++) {
if (headers_in[counter].key == NULL || headers_in[counter].val == NULL
AP_DECLARE(char **) ap_create_environment(apr_pool_t *p, apr_table_t *t)
{
- apr_array_header_t *env_arr = apr_table_elts(t);
- apr_table_entry_t *elts = (apr_table_entry_t *) env_arr->elts;
+ const apr_array_header_t *env_arr = apr_table_elts(t);
+ const apr_table_entry_t *elts = (const apr_table_entry_t *) env_arr->elts;
char **env = (char **) apr_palloc(p, (env_arr->nelts + 2) * sizeof(char *));
int i, j;
char *tz;
char *env_temp;
#endif
const char *host;
- apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
- apr_table_entry_t *hdrs = (apr_table_entry_t *) hdrs_arr->elts;
+ const apr_array_header_t *hdrs_arr = apr_table_elts(r->headers_in);
+ const apr_table_entry_t *hdrs = (const apr_table_entry_t *) hdrs_arr->elts;
int i;
apr_port_t rport;
apr_sockaddr_t *remotesa;