1 diff -urN mod_fastcgi-2.4.2.org/fcgi_buf.c mod_fastcgi-2.4.2/fcgi_buf.c
2 --- mod_fastcgi-2.4.2.org/fcgi_buf.c 2004-10-06 20:30:46.335894544 +0200
3 +++ mod_fastcgi-2.4.2/fcgi_buf.c 2004-10-06 21:35:48.998840536 +0200
8 - buf = (Buffer *)ap_pcalloc(p, sizeof(Buffer) + size);
9 + buf = (Buffer *)apr_pcalloc(p, sizeof(Buffer) + size);
15 int new_nalloc = (arr->nalloc <= 0) ? n : arr->nelts + n;
17 - new_elts = ap_pcalloc(arr->pool, arr->elt_size * new_nalloc);
18 + new_elts = apr_pcalloc(arr->pool, arr->elt_size * new_nalloc);
19 memcpy(new_elts, arr->elts, arr->nelts * arr->elt_size);
22 diff -urN mod_fastcgi-2.4.2.org/fcgi_config.c mod_fastcgi-2.4.2/fcgi_config.c
23 --- mod_fastcgi-2.4.2.org/fcgi_config.c 2004-10-06 20:30:46.336894330 +0200
24 +++ mod_fastcgi-2.4.2/fcgi_config.c 2004-10-06 21:35:49.003839465 +0200
26 /* Convert port number */
27 tmp = (u_short) strtol(portStr, &cvptr, 10);
28 if (*cvptr != '\0' || tmp < 1 || tmp > USHRT_MAX)
29 - return ap_pstrcat(p, "bad port number \"", portStr, "\"", NULL);
30 + return apr_pstrcat(p, "bad port number \"", portStr, "\"", NULL);
32 *port = (unsigned short) tmp;
35 tmp = strtol(txt, &ptr, 10);
38 - return ap_pstrcat(p, "\"", txt, "\" must be a positive integer", NULL);
39 + return apr_pstrcat(p, "\"", txt, "\" must be a positive integer", NULL);
42 if (tmp < min || tmp > USHRT_MAX) {
47 - return ap_pstrcat(p, "can't parse ", "\"", val, "\"", NULL);
48 + return apr_pstrcat(p, "can't parse ", "\"", val, "\"", NULL);
53 *num = (u_int)strtol(val, &ptr, 10);
56 - return ap_pstrcat(p, "\"", val, "\" must be a positive integer", NULL);
57 + return apr_pstrcat(p, "\"", val, "\" must be a positive integer", NULL);
59 return ap_psprintf(p, "\"%u\" must be >= %u", *num, min);
62 *num = (float) strtod(val, &ptr);
65 - return ap_pstrcat(p, "\"", val, "\" is not a floating point number", NULL);
66 + return apr_pstrcat(p, "\"", val, "\" is not a floating point number", NULL);
67 if (*num < min || *num > max)
68 return ap_psprintf(p, "\"%f\" is not between %f and %f", *num, min, max);
73 if (strchr(var, '=') == NULL) {
74 - *(envp + *envc) = ap_pstrcat(p, var, "=", getenv(var), NULL);
75 + *(envp + *envc) = apr_pstrcat(p, var, "=", getenv(var), NULL);
78 *(envp + *envc) = var;
83 - *array = ap_make_array(p, 10, sizeof(char*));
84 + *array = apr_array_make(p, 10, sizeof(char*));
87 header = (const char **)ap_push_array(*array);
92 - fcgi_dynamic_dir = ap_pstrcat(p, fcgi_socket_dir, "/dynamic", NULL);
93 + fcgi_dynamic_dir = apr_pstrcat(p, fcgi_socket_dir, "/dynamic", NULL);
95 if ((err = fcgi_config_make_dir(p, fcgi_dynamic_dir)))
96 return ap_psprintf(p, "can't create dynamic directory \"%s\": %s", fcgi_dynamic_dir, err);
99 dp = ap_popendir(tp, fcgi_dynamic_dir);
101 - ap_destroy_pool(tp);
102 + apr_destroy_pool(tp);
103 return ap_psprintf(p, "can't open dynamic directory \"%s\": %s",
104 fcgi_dynamic_dir, strerror(errno));
106 @@ -431,13 +431,13 @@
107 if (strcmp(dirp->d_name, ".") == 0 || strcmp(dirp->d_name, "..") == 0)
110 - unlink(ap_pstrcat(tp, fcgi_dynamic_dir, "/", dirp->d_name, NULL));
111 + unlink(apr_pstrcat(tp, fcgi_dynamic_dir, "/", dirp->d_name, NULL));
115 #endif /* !APACHE2 */
117 - ap_destroy_pool(tp);
118 + apr_destroy_pool(tp);
126 - arg_nc = ap_pstrdup(cmd->pool, arg);
127 + arg_nc = apr_pstrdup(cmd->pool, arg);
132 fcgi_socket_dir = arg_nc;
135 - fcgi_dynamic_dir = ap_pstrcat(cmd->pool, fcgi_socket_dir, "dynamic", NULL);
136 + fcgi_dynamic_dir = apr_pstrcat(cmd->pool, fcgi_socket_dir, "dynamic", NULL);
138 err = fcgi_config_make_dir(tp, fcgi_socket_dir);
141 const char *option, *err;
143 /* Allocate temp storage for the array of initial environment variables */
144 - char **envp = ap_pcalloc(tp, sizeof(char *) * (MAX_INIT_ENV_VARS + 3));
145 + char **envp = apr_pcalloc(tp, sizeof(char *) * (MAX_INIT_ENV_VARS + 3));
146 unsigned int envc = 0;
152 /* Move env array to a surviving pool */
153 - s->envp = (char **)ap_pcalloc(p, sizeof(char *) * (envc + 4));
154 + s->envp = (char **)apr_pcalloc(p, sizeof(char *) * (envc + 4));
155 memcpy(s->envp, envp, sizeof(char *) * envc);
157 /* Initialize process structs */
162 - return ap_pstrcat(tp, name, " requires a path and either a -socket or -host option", NULL);
163 + return apr_pstrcat(tp, name, " requires a path and either a -socket or -host option", NULL);
167 @@ -1037,7 +1037,7 @@
169 /* Allocate temp storage for an initial environment */
170 unsigned int envc = 0;
171 - char **envp = (char **)ap_pcalloc(tp, sizeof(char *) * (MAX_INIT_ENV_VARS + 3));
172 + char **envp = (char **)apr_pcalloc(tp, sizeof(char *) * (MAX_INIT_ENV_VARS + 3));
174 err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
176 @@ -1144,7 +1144,7 @@
178 /* Move env array to a surviving pool, leave 2 extra slots for
179 * WIN32 _FCGI_MUTEX_ and _FCGI_SHUTDOWN_EVENT_ */
180 - dynamicEnvp = (char **)ap_pcalloc(p, sizeof(char *) * (envc + 4));
181 + dynamicEnvp = (char **)apr_pcalloc(p, sizeof(char *) * (envc + 4));
182 memcpy(dynamicEnvp, envp, sizeof(char *) * envc);
185 @@ -1152,7 +1152,7 @@
187 void *fcgi_config_create_dir_config(pool *p, char *dummy)
189 - fcgi_dir_config *dir_config = ap_pcalloc(p, sizeof(fcgi_dir_config));
190 + fcgi_dir_config *dir_config = apr_pcalloc(p, sizeof(fcgi_dir_config));
192 dir_config->authenticator_options = FCGI_AUTHORITATIVE;
193 dir_config->authorizer_options = FCGI_AUTHORITATIVE;
194 diff -urN mod_fastcgi-2.4.2.org/fcgi_pm.c mod_fastcgi-2.4.2/fcgi_pm.c
195 --- mod_fastcgi-2.4.2.org/fcgi_pm.c 2004-10-06 20:30:46.337894116 +0200
196 +++ mod_fastcgi-2.4.2/fcgi_pm.c 2004-10-06 21:35:49.014837109 +0200
201 - dirName = ap_pcalloc(fcgi_config_pool, dnEnd - fs->fs_path + 1);
202 + dirName = apr_pcalloc(fcgi_config_pool, dnEnd - fs->fs_path + 1);
203 dirName = memcpy(dirName, fs->fs_path, dnEnd - fs->fs_path);
205 if (chdir(dirName) < 0) {
207 fs->envp[i - 1] = NULL;
210 - ap_destroy_pool(tp);
211 + apr_destroy_pool(tp);
216 "FastCGI: %s is not executable; ensure interpreted scripts have "
217 "\"#!\" as their first line",
219 - ap_destroy_pool(tp);
220 + apr_destroy_pool(tp);
225 * the arguments (if there are any).
226 * Build the command string to pass to CreateProcess.
228 - quoted_filename = ap_pstrcat(tp, "\"", fs->fs_path, "\"", NULL);
229 + quoted_filename = apr_pstrcat(tp, "\"", fs->fs_path, "\"", NULL);
230 if (interpreter && *interpreter) {
231 - pCommand = ap_pstrcat(tp, interpreter, " ", quoted_filename, NULL);
232 + pCommand = apr_pstrcat(tp, interpreter, " ", quoted_filename, NULL);
235 pCommand = quoted_filename;
237 iEnvBlockLen += strlen(termination_env_string) + 1;
238 iEnvBlockLen += strlen(fs->mutex_env_string) + 1;
240 - pEnvBlock = (char *) ap_pcalloc(tp, iEnvBlockLen);
241 + pEnvBlock = (char *) apr_pcalloc(tp, iEnvBlockLen);
246 CloseHandle(listen_handle);
249 - ap_destroy_pool(tp);
250 + apr_destroy_pool(tp);
254 @@ -1072,9 +1072,9 @@
257 s->mutex_env_string = ap_psprintf(sp, "_FCGI_MUTEX_=%ld", mutex);
258 - s->fs_path = ap_pstrdup(sp, cjob->fs_path);
259 + s->fs_path = apr_pstrdup(sp, cjob->fs_path);
261 - s->fs_path = ap_pstrdup(sp, execName);
262 + s->fs_path = apr_pstrdup(sp, execName);
264 ap_getparents(s->fs_path);
265 ap_no2slash(s->fs_path);
266 @@ -1094,7 +1094,7 @@
267 s->socket_path = fcgi_util_socket_make_path_absolute(sp, s->socket_path, 1);
269 /* Create sockaddr, prealloc it so it won't get created in tp */
270 - s->socket_addr = ap_pcalloc(sp, sizeof(struct sockaddr_un));
271 + s->socket_addr = apr_pcalloc(sp, sizeof(struct sockaddr_un));
272 err = fcgi_util_socket_make_domain_addr(tp, (struct sockaddr_un **)&s->socket_addr,
273 &s->socket_addr_len, s->socket_path);
275 @@ -1120,7 +1120,7 @@
279 - s->user = ap_pstrdup(sp, user);
280 + s->user = apr_pstrdup(sp, user);
281 s->username = s->user;
284 @@ -1137,11 +1137,11 @@
285 execName, (long)s->uid);
288 - s->user = ap_pstrdup(sp, user);
289 - s->username = ap_pstrdup(sp, pw->pw_name);
290 + s->user = apr_pstrdup(sp, user);
291 + s->username = apr_pstrdup(sp, pw->pw_name);
293 s->gid = (gid_t)atol(group);
294 - s->group = ap_pstrdup(sp, group);
295 + s->group = apr_pstrdup(sp, group);
299 @@ -1340,7 +1340,7 @@
303 - if (sp) ap_destroy_pool(sp);
304 + if (sp) apr_destroy_pool(sp);
308 @@ -1362,7 +1362,7 @@
312 - ap_destroy_pool(tp);
313 + apr_destroy_pool(tp);
317 diff -urN mod_fastcgi-2.4.2.org/fcgi_protocol.c mod_fastcgi-2.4.2/fcgi_protocol.c
318 --- mod_fastcgi-2.4.2.org/fcgi_protocol.c 2004-10-06 20:30:46.338893902 +0200
319 +++ mod_fastcgi-2.4.2/fcgi_protocol.c 2004-10-06 21:35:49.017836467 +0200
323 if (r->the_request == NULL)
324 - return (char *) ap_pcalloc(r->pool, 1);
325 + return (char *) apr_pcalloc(r->pool, 1);
327 first = r->the_request; /* use the request-line */
329 @@ -135,18 +135,18 @@
331 table *e = r->subprocess_env;
333 - ap_table_setn(e, "GATEWAY_INTERFACE", "CGI/1.1");
334 - ap_table_setn(e, "SERVER_PROTOCOL", r->protocol);
335 - ap_table_setn(e, "REQUEST_METHOD", r->method);
336 - ap_table_setn(e, "QUERY_STRING", r->args ? r->args : "");
337 - ap_table_setn(e, "REQUEST_URI", apache_original_uri(r));
338 + apr_table_setn(e, "GATEWAY_INTERFACE", "CGI/1.1");
339 + apr_table_setn(e, "SERVER_PROTOCOL", r->protocol);
340 + apr_table_setn(e, "REQUEST_METHOD", r->method);
341 + apr_table_setn(e, "QUERY_STRING", r->args ? r->args : "");
342 + apr_table_setn(e, "REQUEST_URI", apache_original_uri(r));
344 /* The FastCGI spec precludes sending of CONTENT_LENGTH, PATH_INFO,
345 * PATH_TRANSLATED, and SCRIPT_NAME (for some reason?). PATH_TRANSLATED we
346 * don't have, its the variable that causes Apache to break trying to set
347 * up (and thus the reason this fn exists vs. using ap_add_cgi_vars()). */
349 - ap_table_unset(e, "CONTENT_LENGTH");
350 + apr_table_unset(e, "CONTENT_LENGTH");
354 @@ -155,17 +155,17 @@
355 * args and path_info of the original request, and not any that may have
356 * come with the script URI in the include command. Ugh. */
357 if (!strcmp(r->protocol, "INCLUDED")) {
358 - ap_table_setn(e, "SCRIPT_NAME", r->uri);
359 + apr_table_setn(e, "SCRIPT_NAME", r->uri);
360 if (r->path_info && *r->path_info)
361 - ap_table_setn(e, "PATH_INFO", r->path_info);
362 + apr_table_setn(e, "PATH_INFO", r->path_info);
364 else if (!r->path_info || !*r->path_info)
365 - ap_table_setn(e, "SCRIPT_NAME", r->uri);
366 + apr_table_setn(e, "SCRIPT_NAME", r->uri);
368 int path_info_start = ap_find_path_info(r->uri, r->path_info);
370 - ap_table_setn(e, "SCRIPT_NAME", ap_pstrndup(r->pool, r->uri, path_info_start));
371 - ap_table_setn(e, "PATH_INFO", r->path_info);
372 + apr_table_setn(e, "SCRIPT_NAME", ap_pstrndup(r->pool, r->uri, path_info_start));
373 + apr_table_setn(e, "PATH_INFO", r->path_info);
380 for ( ; i; --i, ++elt) {
381 - const char *val = ap_table_get(fr->r->headers_in, *elt);
382 + const char *val = apr_table_get(fr->r->headers_in, *elt);
384 - ap_table_setn(fr->r->subprocess_env, *elt, val);
385 + apr_table_setn(fr->r->subprocess_env, *elt, val);
391 if (fr->fs_stderr == NULL)
393 - fr->fs_stderr = ap_palloc(p, FCGI_SERVER_MAX_STDERR_LINE_LEN + 1);
394 + fr->fs_stderr = apr_palloc(p, FCGI_SERVER_MAX_STDERR_LINE_LEN + 1);
397 /* We're gonna consume all thats here */
398 diff -urN mod_fastcgi-2.4.2.org/fcgi_util.c mod_fastcgi-2.4.2/fcgi_util.c
399 --- mod_fastcgi-2.4.2.org/fcgi_util.c 2004-10-06 20:30:46.339893687 +0200
400 +++ mod_fastcgi-2.4.2/fcgi_util.c 2004-10-06 21:35:49.021835610 +0200
402 fcgi_util_socket_hash_filename(pool *p, const char *path,
403 const char *user, const char *group)
405 - char *buf = ap_pstrcat(p, path, user, group, NULL);
406 + char *buf = apr_pstrcat(p, path, user, group, NULL);
408 /* Canonicalize the path (remove "//", ".", "..") */
414 - p = ap_pstrcat(a, "\\", src2, NULL);
415 + p = apr_pstrcat(a, "\\", src2, NULL);
417 else if (src1[x - 1] != '\\' && src1[x - 1] != '/') {
418 - p = ap_pstrcat(a, src1, "\\", src2, NULL);
419 + p = apr_pstrcat(a, src1, "\\", src2, NULL);
422 - p = ap_pstrcat(a, src1, src2, NULL);
423 + p = apr_pstrcat(a, src1, src2, NULL);
427 @@ -137,12 +137,12 @@
428 int socket_pathLen = strlen(socket_path);
430 if (socket_pathLen >= sizeof((*socket_addr)->sun_path)) {
431 - return ap_pstrcat(p, "path \"", socket_path,
432 + return apr_pstrcat(p, "path \"", socket_path,
433 "\" is too long for a Domain socket", NULL);
436 if (*socket_addr == NULL)
437 - *socket_addr = ap_pcalloc(p, sizeof(struct sockaddr_un));
438 + *socket_addr = apr_pcalloc(p, sizeof(struct sockaddr_un));
440 memset(*socket_addr, 0, sizeof(struct sockaddr_un));
443 int *socket_addr_len, const char *host, unsigned short port)
445 if (*socket_addr == NULL)
446 - *socket_addr = ap_pcalloc(p, sizeof(struct sockaddr_in));
447 + *socket_addr = apr_pcalloc(p, sizeof(struct sockaddr_in));
449 memset(*socket_addr, 0, sizeof(struct sockaddr_in));
452 /* Get an in_addr represention of the host */
454 if (convert_string_to_in_addr(host, &(*socket_addr)->sin_addr) != 1) {
455 - return ap_pstrcat(p, "failed to resolve \"", host,
456 + return apr_pstrcat(p, "failed to resolve \"", host,
457 "\" to exactly one IP address", NULL);
463 /* @@@ This should now be done in the loop below */
464 - ap_cpystrn(path, ePath, FCGI_MAXPATH);
465 + apr_cpystrn(path, ePath, FCGI_MAXPATH);
468 for (s = fcgi_servers; s != NULL; s = s->next) {
470 char path[FCGI_MAXPATH];
473 - ap_cpystrn(path, ePath, FCGI_MAXPATH);
474 + apr_cpystrn(path, ePath, FCGI_MAXPATH);
477 for (s = fcgi_servers; s != NULL; s = s->next) {
482 - finfo = (struct stat *)ap_palloc(p, sizeof(struct stat));
483 + finfo = (struct stat *)apr_palloc(p, sizeof(struct stat));
484 if (stat(fs_path, finfo) < 0)
485 return ap_psprintf(p, "stat(%s) failed: %s", fs_path, strerror(errno));
489 fcgi_util_fs_new(pool *p)
491 - fcgi_server *s = (fcgi_server *) ap_pcalloc(p, sizeof(fcgi_server));
492 + fcgi_server *s = (fcgi_server *) apr_pcalloc(p, sizeof(fcgi_server));
494 /* Initialize anything who's init state is not zeroizzzzed */
495 s->listenQueueDepth = FCGI_DEFAULT_LISTEN_Q;
497 "you probably need to modify the User directive: %s",
498 (long)uid, strerror(errno));
500 - s->user = ap_pstrdup(p, pw->pw_name);
501 + s->user = apr_pstrdup(p, pw->pw_name);
502 s->username = s->user;
506 "you probably need to modify the Group directive: %s",
507 (long)gid, strerror(errno));
509 - s->group = ap_pstrdup(p, gr->gr_name);
510 + s->group = apr_pstrdup(p, gr->gr_name);
515 fcgi_util_fs_create_procs(pool *p, int num)
518 - ServerProcess *proc = (ServerProcess *)ap_pcalloc(p, sizeof(ServerProcess) * num);
519 + ServerProcess *proc = (ServerProcess *)apr_pcalloc(p, sizeof(ServerProcess) * num);
521 for (i = 0; i < num; i++) {
523 diff -urN mod_fastcgi-2.4.2.org/mod_fastcgi.c mod_fastcgi-2.4.2/mod_fastcgi.c
524 --- mod_fastcgi-2.4.2.org/mod_fastcgi.c 2004-10-06 20:30:46.355890260 +0200
525 +++ mod_fastcgi-2.4.2/mod_fastcgi.c 2004-10-06 21:35:49.036832397 +0200
528 /* Register to reset to default values when the config pool is cleaned */
530 - ap_register_cleanup(p, NULL, fcgi_config_reset_globals, ap_null_cleanup);
531 + ap_register_cleanup(p, NULL, fcgi_config_reset_globals, apr_pool_cleanup_null);
537 if (fcgi_socket_dir == NULL)
538 fcgi_socket_dir = DEFAULT_SOCK_DIR;
539 - fcgi_dynamic_dir = ap_pstrcat(p, fcgi_socket_dir, "dynamic", NULL);
540 + fcgi_dynamic_dir = apr_pstrcat(p, fcgi_socket_dir, "dynamic", NULL);
543 if (fcgi_socket_dir == NULL)
547 r->status = statusValue;
548 - r->status_line = ap_pstrdup(r->pool, value);
549 + r->status_line = apr_pstrdup(r->pool, value);
554 goto DuplicateNotAllowed;
556 hasContentType = TRUE;
557 - r->content_type = ap_pstrdup(r->pool, value);
558 + r->content_type = apr_pstrdup(r->pool, value);
563 * Who responds, this handler or Apache?
566 - const char *location = ap_table_get(r->headers_out, "Location");
567 + const char *location = apr_table_get(r->headers_out, "Location");
569 * Based on internal redirect handling in mod_cgi.c...
571 @@ -1019,9 +1019,9 @@
572 char *end = strchr(r->uri + 2, '/');
575 - *user = memcpy(ap_pcalloc(r->pool, end - r->uri), r->uri + 1, end - r->uri - 1);
576 + *user = memcpy(apr_pcalloc(r->pool, end - r->uri), r->uri + 1, end - r->uri - 1);
578 - *user = ap_pstrdup(r->pool, r->uri + 1);
579 + *user = apr_pstrdup(r->pool, r->uri + 1);
583 @@ -1225,7 +1225,7 @@
585 /* xxx this handle should live somewhere (see CloseHandle()s below too) */
586 char * wait_npipe_mutex_name, * cp;
587 - wait_npipe_mutex_name = cp = ap_pstrdup(rp, socket_path);
588 + wait_npipe_mutex_name = cp = apr_pstrdup(rp, socket_path);
589 while ((cp = strchr(cp, '\\'))) *cp = '/';
591 wait_npipe_mutex = CreateMutex(NULL, FALSE, wait_npipe_mutex_name);
592 @@ -2318,7 +2318,7 @@
596 - ap_register_cleanup(rp, (void *)fr, cleanup, ap_null_cleanup);
597 + ap_register_cleanup(rp, (void *)fr, cleanup, apr_pool_cleanup_null);
601 @@ -2422,7 +2422,7 @@
603 pool * const p = r->pool;
605 - fcgi_request * const fr = (fcgi_request *)ap_pcalloc(p, sizeof(fcgi_request));
606 + fcgi_request * const fr = (fcgi_request *)apr_pcalloc(p, sizeof(fcgi_request));
610 @@ -2450,7 +2450,7 @@
614 - my_finfo = (struct stat *) ap_palloc(p, sizeof(struct stat));
615 + my_finfo = (struct stat *) apr_palloc(p, sizeof(struct stat));
617 if (stat(fs_path, my_finfo) < 0)
619 @@ -2476,7 +2476,7 @@
620 fr->erBufPtr = fcgi_buf_new(p, sizeof(FCGI_EndRequestBody) + 1);
621 fr->gotHeader = FALSE;
622 fr->parseHeader = SCAN_CGI_READING_HEADERS;
623 - fr->header = ap_make_array(p, 1, 1);
624 + fr->header = apr_array_make(p, 1, 1);
625 fr->fs_stderr = NULL;
627 fr->readingEndRequestBody = FALSE;
628 @@ -2531,7 +2531,7 @@
630 static int apache_is_scriptaliased(request_rec *r)
632 - const char *t = ap_table_get(r->notes, "alias-forced-type");
633 + const char *t = apr_table_get(r->notes, "alias-forced-type");
634 return t && (!strcasecmp(t, "cgi-script"));
637 @@ -2554,9 +2554,9 @@
640 r->method_number = M_GET;
641 - ap_table_unset(r->headers_in, "Content-length");
642 + apr_table_unset(r->headers_in, "Content-length");
644 - ap_internal_redirect_handler(ap_table_get(r->headers_out, "Location"), r);
645 + ap_internal_redirect_handler(apr_table_get(r->headers_out, "Location"), r);
648 case SCAN_CGI_SRV_REDIRECT:
649 @@ -2612,21 +2612,21 @@
650 if (strncasecmp(key, "Variable-", 9) == 0)
653 - ap_table_setn(t, key, val);
654 + apr_table_setn(t, key, val);
658 static int post_process_auth_passed_compat_header(table *t, const char *key, const char * const val)
660 if (strncasecmp(key, "Variable-", 9) == 0)
661 - ap_table_setn(t, key + 9, val);
662 + apr_table_setn(t, key + 9, val);
667 static int post_process_auth_failed_header(table * const t, const char * const key, const char * const val)
669 - ap_table_setn(t, key, val);
670 + apr_table_setn(t, key, val);
674 @@ -2639,16 +2639,16 @@
677 if (fr->auth_compat) {
678 - ap_table_do((int (*)(void *, const char *, const char *))post_process_auth_passed_compat_header,
679 + apr_table_do((int (*)(void *, const char *, const char *))post_process_auth_passed_compat_header,
680 (void *)r->subprocess_env, fr->authHeaders, NULL);
683 - ap_table_do((int (*)(void *, const char *, const char *))post_process_auth_passed_header,
684 + apr_table_do((int (*)(void *, const char *, const char *))post_process_auth_passed_header,
685 (void *)r->subprocess_env, fr->authHeaders, NULL);
689 - ap_table_do((int (*)(void *, const char *, const char *))post_process_auth_failed_header,
690 + apr_table_do((int (*)(void *, const char *, const char *))post_process_auth_failed_header,
691 (void *)r->err_headers_out, fr->authHeaders, NULL);
694 @@ -2681,8 +2681,8 @@
695 /* Save the existing subprocess_env, because we're gonna muddy it up */
696 fr->saved_subprocess_env = ap_copy_table(r->pool, r->subprocess_env);
698 - ap_table_setn(r->subprocess_env, "REMOTE_PASSWD", password);
699 - ap_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "AUTHENTICATOR");
700 + apr_table_setn(r->subprocess_env, "REMOTE_PASSWD", password);
701 + apr_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "AUTHENTICATOR");
703 /* The FastCGI Protocol doesn't differentiate authentication */
704 fr->role = FCGI_AUTHORIZER;
705 @@ -2697,7 +2697,7 @@
706 post_process_auth(fr, authenticated);
708 /* A redirect shouldn't be allowed during the authentication phase */
709 - if (ap_table_get(r->headers_out, "Location") != NULL) {
710 + if (apr_table_get(r->headers_out, "Location") != NULL) {
711 ap_log_rerror(FCGI_LOG_ERR_NOERRNO, r,
712 "FastCGI: FastCgiAuthenticator \"%s\" redirected (not allowed)",
713 dir_config->authenticator);
714 @@ -2748,7 +2748,7 @@
715 /* Save the existing subprocess_env, because we're gonna muddy it up */
716 fr->saved_subprocess_env = ap_copy_table(r->pool, r->subprocess_env);
718 - ap_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "AUTHORIZER");
719 + apr_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "AUTHORIZER");
721 fr->role = FCGI_AUTHORIZER;
723 @@ -2762,7 +2762,7 @@
724 post_process_auth(fr, authorized);
726 /* A redirect shouldn't be allowed during the authorization phase */
727 - if (ap_table_get(r->headers_out, "Location") != NULL) {
728 + if (apr_table_get(r->headers_out, "Location") != NULL) {
729 ap_log_rerror(FCGI_LOG_ERR_NOERRNO, r,
730 "FastCGI: FastCgiAuthorizer \"%s\" redirected (not allowed)",
731 dir_config->authorizer);
732 @@ -2808,7 +2808,7 @@
733 /* Save the existing subprocess_env, because we're gonna muddy it up */
734 fr->saved_subprocess_env = ap_copy_table(r->pool, r->subprocess_env);
736 - ap_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "ACCESS_CHECKER");
737 + apr_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "ACCESS_CHECKER");
739 /* The FastCGI Protocol doesn't differentiate access control */
740 fr->role = FCGI_AUTHORIZER;
741 @@ -2823,7 +2823,7 @@
742 post_process_auth(fr, access_allowed);
744 /* A redirect shouldn't be allowed during the access check phase */
745 - if (ap_table_get(r->headers_out, "Location") != NULL) {
746 + if (apr_table_get(r->headers_out, "Location") != NULL) {
747 ap_log_rerror(FCGI_LOG_ERR_NOERRNO, r,
748 "FastCGI: FastCgiAccessChecker \"%s\" redirected (not allowed)",
749 dir_config->access_checker);