]> git.pld-linux.org Git - packages/apache-mod_fastcgi.git/blob - apache-mod_fastcgi-apr1.patch
- update
[packages/apache-mod_fastcgi.git] / apache-mod_fastcgi-apr1.patch
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
4 @@ -50,7 +50,7 @@
5  {
6      Buffer *buf;
7  
8 -    buf = (Buffer *)ap_pcalloc(p, sizeof(Buffer) + size);
9 +    buf = (Buffer *)apr_pcalloc(p, sizeof(Buffer) + size);
10      buf->size = size;
11      fcgi_buf_reset(buf);
12      return buf;
13 @@ -487,7 +487,7 @@
14          char *new_elts;
15          int new_nalloc = (arr->nalloc <= 0) ? n : arr->nelts + n;
16  
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);
20  
21          arr->elts = new_elts;
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
25 @@ -50,7 +50,7 @@
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);
31  
32      *port = (unsigned short) tmp;
33  
34 @@ -75,7 +75,7 @@
35      tmp = strtol(txt, &ptr, 10);
36  
37      if (*ptr != '\0') {
38 -        return ap_pstrcat(p, "\"", txt, "\" must be a positive integer", NULL);
39 +        return apr_pstrcat(p, "\"", txt, "\" must be a positive integer", NULL);
40         }
41      
42         if (tmp < min || tmp > USHRT_MAX) {
43 @@ -101,7 +101,7 @@
44  
45      if (*cp != '\0')
46      {
47 -        return ap_pstrcat(p, "can't parse ", "\"", val, "\"", NULL);
48 +        return apr_pstrcat(p, "can't parse ", "\"", val, "\"", NULL);
49      }
50      else if (*num < min)
51      {
52 @@ -126,7 +126,7 @@
53      *num = (u_int)strtol(val, &ptr, 10);
54  
55      if (*ptr != '\0')
56 -        return ap_pstrcat(p, "\"", val, "\" must be a positive integer", NULL);
57 +        return apr_pstrcat(p, "\"", val, "\" must be a positive integer", NULL);
58      else if (*num < min)
59          return ap_psprintf(p, "\"%u\" must be >= %u", *num, min);
60      return NULL;
61 @@ -147,7 +147,7 @@
62      *num = (float) strtod(val, &ptr);
63  
64      if (*ptr != '\0')
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);
69      return NULL;
70 @@ -160,7 +160,7 @@
71      }
72  
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);
76      }
77      else {
78          *(envp + *envc) = var;
79 @@ -191,7 +191,7 @@
80      const char **header;
81  
82      if (!*array) {
83 -        *array = ap_make_array(p, 10, sizeof(char*));
84 +        *array = apr_array_make(p, 10, sizeof(char*));
85      }
86  
87      header = (const char **)ap_push_array(*array);
88 @@ -379,7 +379,7 @@
89      const char *err;
90      pool *tp;
91  
92 -    fcgi_dynamic_dir = ap_pstrcat(p, fcgi_socket_dir, "/dynamic", NULL);
93 +    fcgi_dynamic_dir = apr_pstrcat(p, fcgi_socket_dir, "/dynamic", NULL);
94  
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);
97 @@ -419,7 +419,7 @@
98  
99          dp = ap_popendir(tp, fcgi_dynamic_dir);
100          if (dp == NULL) {
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));
105          }
106 @@ -431,13 +431,13 @@
107              if (strcmp(dirp->d_name, ".") == 0 || strcmp(dirp->d_name, "..") == 0)
108                  continue;
109  
110 -            unlink(ap_pstrcat(tp, fcgi_dynamic_dir, "/", dirp->d_name, NULL));
111 +            unlink(apr_pstrcat(tp, fcgi_dynamic_dir, "/", dirp->d_name, NULL));
112          }
113      }
114  
115  #endif /* !APACHE2 */
116  
117 -    ap_destroy_pool(tp);
118 +    apr_destroy_pool(tp);
119  
120      return NULL;
121  }
122 @@ -475,7 +475,7 @@
123              name);
124      }
125  
126 -    arg_nc = ap_pstrdup(cmd->pool, arg);
127 +    arg_nc = apr_pstrdup(cmd->pool, arg);
128  
129  #ifndef WIN32
130  
131 @@ -498,7 +498,7 @@
132      fcgi_socket_dir = arg_nc;
133  
134  #ifdef WIN32
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);
137  #else
138      err = fcgi_config_make_dir(tp, fcgi_socket_dir);
139      if (err != NULL)
140 @@ -596,7 +596,7 @@
141      const char *option, *err;
142  
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;
147  
148  #ifdef WIN32
149 @@ -789,7 +789,7 @@
150      }
151  
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);
156  
157      /* Initialize process structs */
158 @@ -853,7 +853,7 @@
159      }
160  
161      if (!*fs_path) {
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);
164      }
165  
166  #ifdef APACHE2
167 @@ -1037,7 +1037,7 @@
168  
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));
173  
174      err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
175      if (err)
176 @@ -1144,7 +1144,7 @@
177  
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);
183  
184      return NULL;
185 @@ -1152,7 +1152,7 @@
186  
187  void *fcgi_config_create_dir_config(pool *p, char *dummy)
188  {
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));
191  
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
197 @@ -365,7 +365,7 @@
198      if (dnEnd == NULL) {
199          dirName = "./";
200      } else {
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);
204      }
205      if (chdir(dirName) < 0) {
206 @@ -576,7 +576,7 @@
207          fs->envp[i - 1] = NULL;
208      }
209  
210 -    ap_destroy_pool(tp);
211 +    apr_destroy_pool(tp);
212  
213      return proc.pid;
214  
215 @@ -659,7 +659,7 @@
216              "FastCGI: %s is not executable; ensure interpreted scripts have "
217              "\"#!\" as their first line", 
218              fs->fs_path);
219 -        ap_destroy_pool(tp);
220 +        apr_destroy_pool(tp);
221          goto CLEANUP;
222      }
223  
224 @@ -668,9 +668,9 @@
225       * the arguments (if there are any).
226       * Build the command string to pass to CreateProcess. 
227       */
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);
233      }
234      else {
235          pCommand = quoted_filename;
236 @@ -704,7 +704,7 @@
237      iEnvBlockLen += strlen(termination_env_string) + 1;
238      iEnvBlockLen += strlen(fs->mutex_env_string) + 1;
239  
240 -    pEnvBlock = (char *) ap_pcalloc(tp, iEnvBlockLen);
241 +    pEnvBlock = (char *) apr_pcalloc(tp, iEnvBlockLen);
242  
243      i = 0;
244      pNext = pEnvBlock;
245 @@ -744,7 +744,7 @@
246          CloseHandle(listen_handle);
247      }
248  
249 -    ap_destroy_pool(tp);
250 +    apr_destroy_pool(tp);
251  
252      return pid;
253  
254 @@ -1072,9 +1072,9 @@
255              
256  #ifdef WIN32
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);
260  #else
261 -            s->fs_path = ap_pstrdup(sp, execName);
262 +            s->fs_path = apr_pstrdup(sp, execName);
263  #endif
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);
268  
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);
274              if (err) {
275 @@ -1120,7 +1120,7 @@
276                          goto BagNewServer;
277                      }
278                      s->uid = pw->pw_uid;
279 -                    s->user = ap_pstrdup(sp, user);
280 +                    s->user = apr_pstrdup(sp, user);
281                      s->username = s->user;
282  
283                      s->gid = pw->pw_gid;
284 @@ -1137,11 +1137,11 @@
285                              execName, (long)s->uid);
286                          goto BagNewServer;
287                      }
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);
292  
293                      s->gid = (gid_t)atol(group);
294 -                    s->group = ap_pstrdup(sp, group);
295 +                    s->group = apr_pstrdup(sp, group);
296                  }
297              }
298  #else
299 @@ -1340,7 +1340,7 @@
300          continue;
301  
302  BagNewServer:
303 -        if (sp) ap_destroy_pool(sp);
304 +        if (sp) apr_destroy_pool(sp);
305  
306  #ifdef WIN32
307      free(cjob->fs_path);
308 @@ -1362,7 +1362,7 @@
309      }
310  #endif
311  
312 -    ap_destroy_pool(tp);
313 +    apr_destroy_pool(tp);
314  }
315  
316  /*
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
320 @@ -110,7 +110,7 @@
321      char *first, *last;
322  
323      if (r->the_request == NULL)
324 -        return (char *) ap_pcalloc(r->pool, 1);
325 +        return (char *) apr_pcalloc(r->pool, 1);
326  
327      first = r->the_request;    /* use the request-line */
328  
329 @@ -135,18 +135,18 @@
330  {
331      table *e = r->subprocess_env;
332  
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));
343  
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()). */
348      if (compat) {
349 -        ap_table_unset(e, "CONTENT_LENGTH");
350 +        apr_table_unset(e, "CONTENT_LENGTH");
351          return;
352      }
353  
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);
363      }
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);
367      else {
368          int path_info_start = ap_find_path_info(r->uri, r->path_info);
369  
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);
374      }
375  }
376  
377 @@ -178,9 +178,9 @@
378          int i = ph->nelts;
379  
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);
383              if (val) {
384 -                ap_table_setn(fr->r->subprocess_env, *elt, val);
385 +                apr_table_setn(fr->r->subprocess_env, *elt, val);
386              }
387          }
388      }
389 @@ -373,7 +373,7 @@
390  
391                  if (fr->fs_stderr == NULL)
392                  {
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);
395                  }
396  
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
401 @@ -55,7 +55,7 @@
402  fcgi_util_socket_hash_filename(pool *p, const char *path,
403          const char *user, const char *group)
404  {
405 -    char *buf = ap_pstrcat(p, path, user, group, NULL);
406 +    char *buf = apr_pstrcat(p, path, user, group, NULL);
407  
408      /* Canonicalize the path (remove "//", ".", "..") */
409      ap_getparents(buf);
410 @@ -77,13 +77,13 @@
411      x = strlen(src1);
412  
413      if (x == 0) {
414 -           p = ap_pstrcat(a, "\\", src2, NULL);
415 +           p = apr_pstrcat(a, "\\", src2, NULL);
416      }
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);
420      }
421      else {
422 -           p = ap_pstrcat(a, src1, src2, NULL);
423 +           p = apr_pstrcat(a, src1, src2, NULL);
424      }
425  
426      q = p ;
427 @@ -137,12 +137,12 @@
428      int socket_pathLen = strlen(socket_path);
429  
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);
434      }
435  
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));
439      else
440          memset(*socket_addr, 0, sizeof(struct sockaddr_un));
441  
442 @@ -194,7 +194,7 @@
443          int *socket_addr_len, const char *host, unsigned short port)
444  {
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));
448      else
449          memset(*socket_addr, 0, sizeof(struct sockaddr_in));
450  
451 @@ -204,7 +204,7 @@
452      /* Get an in_addr represention of the host */
453      if (host != NULL) {
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);
458          }
459      } else {
460 @@ -311,7 +311,7 @@
461      fcgi_server *s;
462  
463      /* @@@ This should now be done in the loop below */
464 -    ap_cpystrn(path, ePath, FCGI_MAXPATH);
465 +    apr_cpystrn(path, ePath, FCGI_MAXPATH);
466      ap_no2slash(path);
467  
468      for (s = fcgi_servers; s != NULL; s = s->next) {
469 @@ -343,7 +343,7 @@
470      char path[FCGI_MAXPATH];
471      fcgi_server *s;
472  
473 -    ap_cpystrn(path, ePath, FCGI_MAXPATH);
474 +    apr_cpystrn(path, ePath, FCGI_MAXPATH);
475      ap_no2slash(path);
476      
477      for (s = fcgi_servers; s != NULL; s = s->next) {
478 @@ -367,7 +367,7 @@
479      const char *err;
480  
481      if (finfo == NULL) {
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));
486      }
487 @@ -409,7 +409,7 @@
488  fcgi_server *
489  fcgi_util_fs_new(pool *p)
490  {
491 -    fcgi_server *s = (fcgi_server *) ap_pcalloc(p, sizeof(fcgi_server));
492 +    fcgi_server *s = (fcgi_server *) apr_pcalloc(p, sizeof(fcgi_server));
493  
494      /* Initialize anything who's init state is not zeroizzzzed */
495      s->listenQueueDepth = FCGI_DEFAULT_LISTEN_Q;
496 @@ -467,7 +467,7 @@
497              "you probably need to modify the User directive: %s",
498              (long)uid, strerror(errno));
499      }
500 -    s->user = ap_pstrdup(p, pw->pw_name);
501 +    s->user = apr_pstrdup(p, pw->pw_name);
502      s->username = s->user;
503  
504      s->gid = gid;
505 @@ -478,7 +478,7 @@
506              "you probably need to modify the Group directive: %s",
507              (long)gid, strerror(errno));
508      }
509 -    s->group = ap_pstrdup(p, gr->gr_name);
510 +    s->group = apr_pstrdup(p, gr->gr_name);
511  
512  #endif /* !WIN32 */
513  
514 @@ -492,7 +492,7 @@
515  fcgi_util_fs_create_procs(pool *p, int num)
516  {
517      int i;
518 -    ServerProcess *proc = (ServerProcess *)ap_pcalloc(p, sizeof(ServerProcess) * num);
519 +    ServerProcess *proc = (ServerProcess *)apr_pcalloc(p, sizeof(ServerProcess) * num);
520  
521      for (i = 0; i < num; i++) {
522  #ifdef WIN32
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
526 @@ -267,7 +267,7 @@
527  
528      /* Register to reset to default values when the config pool is cleaned */
529      ap_block_alarms();
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);
532      ap_unblock_alarms();
533  
534  #ifdef APACHE2
535 @@ -285,7 +285,7 @@
536  #ifdef WIN32
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);
541  #else
542  
543      if (fcgi_socket_dir == NULL)
544 @@ -726,7 +726,7 @@
545              }
546              hasStatus = TRUE;
547              r->status = statusValue;
548 -            r->status_line = ap_pstrdup(r->pool, value);
549 +            r->status_line = apr_pstrdup(r->pool, value);
550              continue;
551          }
552  
553 @@ -736,7 +736,7 @@
554                      goto DuplicateNotAllowed;
555                  }
556                  hasContentType = TRUE;
557 -                r->content_type = ap_pstrdup(r->pool, value);
558 +                r->content_type = apr_pstrdup(r->pool, value);
559                  continue;
560              }
561  
562 @@ -765,7 +765,7 @@
563       * Who responds, this handler or Apache?
564       */
565      if (hasLocation) {
566 -        const char *location = ap_table_get(r->headers_out, "Location");
567 +        const char *location = apr_table_get(r->headers_out, "Location");
568          /*
569           * Based on internal redirect handling in mod_cgi.c...
570           *
571 @@ -1019,9 +1019,9 @@
572          char *end = strchr(r->uri + 2, '/');
573  
574          if (end)
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);
577          else
578 -            *user = ap_pstrdup(r->pool, r->uri + 1);
579 +            *user = apr_pstrdup(r->pool, r->uri + 1);
580          *group = "-";
581      }
582      else {
583 @@ -1225,7 +1225,7 @@
584          {
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 = '/';
590              
591              wait_npipe_mutex = CreateMutex(NULL, FALSE, wait_npipe_mutex_name);
592 @@ -2318,7 +2318,7 @@
593      }
594  
595      ap_block_alarms();
596 -    ap_register_cleanup(rp, (void *)fr, cleanup, ap_null_cleanup);
597 +    ap_register_cleanup(rp, (void *)fr, cleanup, apr_pool_cleanup_null);
598      ap_unblock_alarms();
599  
600  #ifdef WIN32
601 @@ -2422,7 +2422,7 @@
602      const char *fs_path;
603      pool * const p = r->pool;
604      fcgi_server *fs;
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));
607      uid_t uid;
608      gid_t gid;
609  
610 @@ -2450,7 +2450,7 @@
611          else
612  #endif
613          {
614 -            my_finfo = (struct stat *) ap_palloc(p, sizeof(struct stat));
615 +            my_finfo = (struct stat *) apr_palloc(p, sizeof(struct stat));
616              
617              if (stat(fs_path, my_finfo) < 0) 
618              {
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;
626      fr->r = r;
627      fr->readingEndRequestBody = FALSE;
628 @@ -2531,7 +2531,7 @@
629   */
630  static int apache_is_scriptaliased(request_rec *r)
631  {
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"));
635  }
636  
637 @@ -2554,9 +2554,9 @@
638               */
639              r->method = "GET";
640              r->method_number = M_GET;
641 -            ap_table_unset(r->headers_in, "Content-length");
642 +            apr_table_unset(r->headers_in, "Content-length");
643  
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);
646              return OK;
647  
648          case SCAN_CGI_SRV_REDIRECT:
649 @@ -2612,21 +2612,21 @@
650      if (strncasecmp(key, "Variable-", 9) == 0)
651          key += 9;
652  
653 -    ap_table_setn(t, key, val);
654 +    apr_table_setn(t, key, val);
655      return 1;
656  }
657  
658  static int post_process_auth_passed_compat_header(table *t, const char *key, const char * const val)
659  {
660      if (strncasecmp(key, "Variable-", 9) == 0)
661 -        ap_table_setn(t, key + 9, val);
662 +        apr_table_setn(t, key + 9, val);
663  
664      return 1;
665  }
666  
667  static int post_process_auth_failed_header(table * const t, const char * const key, const char * const val)
668  {
669 -    ap_table_setn(t, key, val);
670 +    apr_table_setn(t, key, val);
671      return 1;
672  }
673  
674 @@ -2639,16 +2639,16 @@
675  
676      if (passed) {
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);
681          }
682          else {
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);
686          }
687      }
688      else {
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);
692      }
693  
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);
697  
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");
702  
703      /* The FastCGI Protocol doesn't differentiate authentication */
704      fr->role = FCGI_AUTHORIZER;
705 @@ -2697,7 +2697,7 @@
706      post_process_auth(fr, authenticated);
707  
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);
717  
718 -    ap_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "AUTHORIZER");
719 +    apr_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "AUTHORIZER");
720  
721      fr->role = FCGI_AUTHORIZER;
722  
723 @@ -2762,7 +2762,7 @@
724      post_process_auth(fr, authorized);
725  
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);
735  
736 -    ap_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "ACCESS_CHECKER");
737 +    apr_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "ACCESS_CHECKER");
738  
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);
743  
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);
This page took 0.083495 seconds and 4 git commands to generate.