]> 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_config.c mod_fastcgi-2.4.2/fcgi_config.c
2 --- mod_fastcgi-2.4.2.org/fcgi_config.c 2004-10-06 20:30:46.336894330 +0200
3 +++ mod_fastcgi-2.4.2/fcgi_config.c     2004-10-06 20:49:14.557484059 +0200
4 @@ -191,7 +191,7 @@
5      const char **header;
6  
7      if (!*array) {
8 -        *array = ap_make_array(p, 10, sizeof(char*));
9 +        *array = apr_make_array(p, 10, sizeof(char*));
10      }
11  
12      header = (const char **)ap_push_array(*array);
13 @@ -419,7 +419,7 @@
14  
15          dp = ap_popendir(tp, fcgi_dynamic_dir);
16          if (dp == NULL) {
17 -            ap_destroy_pool(tp);
18 +            apr_destroy_pool(tp);
19              return ap_psprintf(p, "can't open dynamic directory \"%s\": %s",
20                  fcgi_dynamic_dir, strerror(errno));
21          }
22 @@ -437,7 +437,7 @@
23  
24  #endif /* !APACHE2 */
25  
26 -    ap_destroy_pool(tp);
27 +    apr_destroy_pool(tp);
28  
29      return NULL;
30  }
31 diff -urN mod_fastcgi-2.4.2.org/fcgi_pm.c mod_fastcgi-2.4.2/fcgi_pm.c
32 --- mod_fastcgi-2.4.2.org/fcgi_pm.c     2004-10-06 20:30:46.337894116 +0200
33 +++ mod_fastcgi-2.4.2/fcgi_pm.c 2004-10-06 20:49:14.568481703 +0200
34 @@ -576,7 +576,7 @@
35          fs->envp[i - 1] = NULL;
36      }
37  
38 -    ap_destroy_pool(tp);
39 +    apr_destroy_pool(tp);
40  
41      return proc.pid;
42  
43 @@ -659,7 +659,7 @@
44              "FastCGI: %s is not executable; ensure interpreted scripts have "
45              "\"#!\" as their first line", 
46              fs->fs_path);
47 -        ap_destroy_pool(tp);
48 +        apr_destroy_pool(tp);
49          goto CLEANUP;
50      }
51  
52 @@ -744,7 +744,7 @@
53          CloseHandle(listen_handle);
54      }
55  
56 -    ap_destroy_pool(tp);
57 +    apr_destroy_pool(tp);
58  
59      return pid;
60  
61 @@ -1340,7 +1340,7 @@
62          continue;
63  
64  BagNewServer:
65 -        if (sp) ap_destroy_pool(sp);
66 +        if (sp) apr_destroy_pool(sp);
67  
68  #ifdef WIN32
69      free(cjob->fs_path);
70 @@ -1362,7 +1362,7 @@
71      }
72  #endif
73  
74 -    ap_destroy_pool(tp);
75 +    apr_destroy_pool(tp);
76  }
77  
78  /*
79 diff -urN mod_fastcgi-2.4.2.org/fcgi_protocol.c mod_fastcgi-2.4.2/fcgi_protocol.c
80 --- mod_fastcgi-2.4.2.org/fcgi_protocol.c       2004-10-06 20:30:46.338893902 +0200
81 +++ mod_fastcgi-2.4.2/fcgi_protocol.c   2004-10-06 20:49:14.570481275 +0200
82 @@ -135,11 +135,11 @@
83  {
84      table *e = r->subprocess_env;
85  
86 -    ap_table_setn(e, "GATEWAY_INTERFACE", "CGI/1.1");
87 -    ap_table_setn(e, "SERVER_PROTOCOL", r->protocol);
88 -    ap_table_setn(e, "REQUEST_METHOD", r->method);
89 -    ap_table_setn(e, "QUERY_STRING", r->args ? r->args : "");
90 -    ap_table_setn(e, "REQUEST_URI", apache_original_uri(r));
91 +    apr_table_setn(e, "GATEWAY_INTERFACE", "CGI/1.1");
92 +    apr_table_setn(e, "SERVER_PROTOCOL", r->protocol);
93 +    apr_table_setn(e, "REQUEST_METHOD", r->method);
94 +    apr_table_setn(e, "QUERY_STRING", r->args ? r->args : "");
95 +    apr_table_setn(e, "REQUEST_URI", apache_original_uri(r));
96  
97      /* The FastCGI spec precludes sending of CONTENT_LENGTH, PATH_INFO,
98       * PATH_TRANSLATED, and SCRIPT_NAME (for some reason?).  PATH_TRANSLATED we
99 @@ -155,17 +155,17 @@
100       * args and path_info of the original request, and not any that may have
101       * come with the script URI in the include command.  Ugh. */
102      if (!strcmp(r->protocol, "INCLUDED")) {
103 -        ap_table_setn(e, "SCRIPT_NAME", r->uri);
104 +        apr_table_setn(e, "SCRIPT_NAME", r->uri);
105          if (r->path_info && *r->path_info)
106 -            ap_table_setn(e, "PATH_INFO", r->path_info);
107 +            apr_table_setn(e, "PATH_INFO", r->path_info);
108      }
109      else if (!r->path_info || !*r->path_info)
110 -        ap_table_setn(e, "SCRIPT_NAME", r->uri);
111 +        apr_table_setn(e, "SCRIPT_NAME", r->uri);
112      else {
113          int path_info_start = ap_find_path_info(r->uri, r->path_info);
114  
115 -        ap_table_setn(e, "SCRIPT_NAME", ap_pstrndup(r->pool, r->uri, path_info_start));
116 -        ap_table_setn(e, "PATH_INFO", r->path_info);
117 +        apr_table_setn(e, "SCRIPT_NAME", ap_pstrndup(r->pool, r->uri, path_info_start));
118 +        apr_table_setn(e, "PATH_INFO", r->path_info);
119      }
120  }
121  
122 @@ -178,9 +178,9 @@
123          int i = ph->nelts;
124  
125          for ( ; i; --i, ++elt) {
126 -            const char *val = ap_table_get(fr->r->headers_in, *elt);
127 +            const char *val = apr_table_get(fr->r->headers_in, *elt);
128              if (val) {
129 -                ap_table_setn(fr->r->subprocess_env, *elt, val);
130 +                apr_table_setn(fr->r->subprocess_env, *elt, val);
131              }
132          }
133      }
134 @@ -373,7 +373,7 @@
135  
136                  if (fr->fs_stderr == NULL)
137                  {
138 -                    fr->fs_stderr = ap_palloc(p, FCGI_SERVER_MAX_STDERR_LINE_LEN + 1);
139 +                    fr->fs_stderr = apr_palloc(p, FCGI_SERVER_MAX_STDERR_LINE_LEN + 1);
140                  }
141  
142                  /* We're gonna consume all thats here */
143 diff -urN mod_fastcgi-2.4.2.org/fcgi_util.c mod_fastcgi-2.4.2/fcgi_util.c
144 --- mod_fastcgi-2.4.2.org/fcgi_util.c   2004-10-06 20:30:46.339893687 +0200
145 +++ mod_fastcgi-2.4.2/fcgi_util.c       2004-10-06 20:49:14.574480418 +0200
146 @@ -367,7 +367,7 @@
147      const char *err;
148  
149      if (finfo == NULL) {
150 -        finfo = (struct stat *)ap_palloc(p, sizeof(struct stat));              
151 +        finfo = (struct stat *)apr_palloc(p, sizeof(struct stat));             
152          if (stat(fs_path, finfo) < 0)
153              return ap_psprintf(p, "stat(%s) failed: %s", fs_path, strerror(errno));
154      }
155 diff -urN mod_fastcgi-2.4.2.org/mod_fastcgi.c mod_fastcgi-2.4.2/mod_fastcgi.c
156 --- mod_fastcgi-2.4.2.org/mod_fastcgi.c 2004-10-06 20:30:46.355890260 +0200
157 +++ mod_fastcgi-2.4.2/mod_fastcgi.c     2004-10-06 20:49:14.587477634 +0200
158 @@ -267,7 +267,7 @@
159  
160      /* Register to reset to default values when the config pool is cleaned */
161      ap_block_alarms();
162 -    ap_register_cleanup(p, NULL, fcgi_config_reset_globals, ap_null_cleanup);
163 +    ap_register_cleanup(p, NULL, fcgi_config_reset_globals, apr_pool_cleanup_null);
164      ap_unblock_alarms();
165  
166  #ifdef APACHE2
167 @@ -765,7 +765,7 @@
168       * Who responds, this handler or Apache?
169       */
170      if (hasLocation) {
171 -        const char *location = ap_table_get(r->headers_out, "Location");
172 +        const char *location = apr_table_get(r->headers_out, "Location");
173          /*
174           * Based on internal redirect handling in mod_cgi.c...
175           *
176 @@ -2318,7 +2318,7 @@
177      }
178  
179      ap_block_alarms();
180 -    ap_register_cleanup(rp, (void *)fr, cleanup, ap_null_cleanup);
181 +    ap_register_cleanup(rp, (void *)fr, cleanup, apr_pool_cleanup_null);
182      ap_unblock_alarms();
183  
184  #ifdef WIN32
185 @@ -2450,7 +2450,7 @@
186          else
187  #endif
188          {
189 -            my_finfo = (struct stat *) ap_palloc(p, sizeof(struct stat));
190 +            my_finfo = (struct stat *) apr_palloc(p, sizeof(struct stat));
191              
192              if (stat(fs_path, my_finfo) < 0) 
193              {
194 @@ -2476,7 +2476,7 @@
195      fr->erBufPtr = fcgi_buf_new(p, sizeof(FCGI_EndRequestBody) + 1);
196      fr->gotHeader = FALSE;
197      fr->parseHeader = SCAN_CGI_READING_HEADERS;
198 -    fr->header = ap_make_array(p, 1, 1);
199 +    fr->header = apr_make_array(p, 1, 1);
200      fr->fs_stderr = NULL;
201      fr->r = r;
202      fr->readingEndRequestBody = FALSE;
203 @@ -2531,7 +2531,7 @@
204   */
205  static int apache_is_scriptaliased(request_rec *r)
206  {
207 -    const char *t = ap_table_get(r->notes, "alias-forced-type");
208 +    const char *t = apr_table_get(r->notes, "alias-forced-type");
209      return t && (!strcasecmp(t, "cgi-script"));
210  }
211  
212 @@ -2556,7 +2556,7 @@
213              r->method_number = M_GET;
214              ap_table_unset(r->headers_in, "Content-length");
215  
216 -            ap_internal_redirect_handler(ap_table_get(r->headers_out, "Location"), r);
217 +            ap_internal_redirect_handler(apr_table_get(r->headers_out, "Location"), r);
218              return OK;
219  
220          case SCAN_CGI_SRV_REDIRECT:
221 @@ -2612,21 +2612,21 @@
222      if (strncasecmp(key, "Variable-", 9) == 0)
223          key += 9;
224  
225 -    ap_table_setn(t, key, val);
226 +    apr_table_setn(t, key, val);
227      return 1;
228  }
229  
230  static int post_process_auth_passed_compat_header(table *t, const char *key, const char * const val)
231  {
232      if (strncasecmp(key, "Variable-", 9) == 0)
233 -        ap_table_setn(t, key + 9, val);
234 +        apr_table_setn(t, key + 9, val);
235  
236      return 1;
237  }
238  
239  static int post_process_auth_failed_header(table * const t, const char * const key, const char * const val)
240  {
241 -    ap_table_setn(t, key, val);
242 +    apr_table_setn(t, key, val);
243      return 1;
244  }
245  
246 @@ -2639,16 +2639,16 @@
247  
248      if (passed) {
249          if (fr->auth_compat) {
250 -            ap_table_do((int (*)(void *, const char *, const char *))post_process_auth_passed_compat_header,
251 +            apr_table_do((int (*)(void *, const char *, const char *))post_process_auth_passed_compat_header,
252                   (void *)r->subprocess_env, fr->authHeaders, NULL);
253          }
254          else {
255 -            ap_table_do((int (*)(void *, const char *, const char *))post_process_auth_passed_header,
256 +            apr_table_do((int (*)(void *, const char *, const char *))post_process_auth_passed_header,
257                   (void *)r->subprocess_env, fr->authHeaders, NULL);
258          }
259      }
260      else {
261 -        ap_table_do((int (*)(void *, const char *, const char *))post_process_auth_failed_header,
262 +        apr_table_do((int (*)(void *, const char *, const char *))post_process_auth_failed_header,
263               (void *)r->err_headers_out, fr->authHeaders, NULL);
264      }
265  
266 @@ -2681,8 +2681,8 @@
267      /* Save the existing subprocess_env, because we're gonna muddy it up */
268      fr->saved_subprocess_env = ap_copy_table(r->pool, r->subprocess_env);
269  
270 -    ap_table_setn(r->subprocess_env, "REMOTE_PASSWD", password);
271 -    ap_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "AUTHENTICATOR");
272 +    apr_table_setn(r->subprocess_env, "REMOTE_PASSWD", password);
273 +    apr_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "AUTHENTICATOR");
274  
275      /* The FastCGI Protocol doesn't differentiate authentication */
276      fr->role = FCGI_AUTHORIZER;
277 @@ -2697,7 +2697,7 @@
278      post_process_auth(fr, authenticated);
279  
280      /* A redirect shouldn't be allowed during the authentication phase */
281 -    if (ap_table_get(r->headers_out, "Location") != NULL) {
282 +    if (apr_table_get(r->headers_out, "Location") != NULL) {
283          ap_log_rerror(FCGI_LOG_ERR_NOERRNO, r,
284              "FastCGI: FastCgiAuthenticator \"%s\" redirected (not allowed)",
285              dir_config->authenticator);
286 @@ -2748,7 +2748,7 @@
287      /* Save the existing subprocess_env, because we're gonna muddy it up */
288      fr->saved_subprocess_env = ap_copy_table(r->pool, r->subprocess_env);
289  
290 -    ap_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "AUTHORIZER");
291 +    apr_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "AUTHORIZER");
292  
293      fr->role = FCGI_AUTHORIZER;
294  
295 @@ -2762,7 +2762,7 @@
296      post_process_auth(fr, authorized);
297  
298      /* A redirect shouldn't be allowed during the authorization phase */
299 -    if (ap_table_get(r->headers_out, "Location") != NULL) {
300 +    if (apr_table_get(r->headers_out, "Location") != NULL) {
301          ap_log_rerror(FCGI_LOG_ERR_NOERRNO, r,
302              "FastCGI: FastCgiAuthorizer \"%s\" redirected (not allowed)",
303              dir_config->authorizer);
304 @@ -2808,7 +2808,7 @@
305      /* Save the existing subprocess_env, because we're gonna muddy it up */
306      fr->saved_subprocess_env = ap_copy_table(r->pool, r->subprocess_env);
307  
308 -    ap_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "ACCESS_CHECKER");
309 +    apr_table_setn(r->subprocess_env, "FCGI_APACHE_ROLE", "ACCESS_CHECKER");
310  
311      /* The FastCGI Protocol doesn't differentiate access control */
312      fr->role = FCGI_AUTHORIZER;
313 @@ -2823,7 +2823,7 @@
314      post_process_auth(fr, access_allowed);
315  
316      /* A redirect shouldn't be allowed during the access check phase */
317 -    if (ap_table_get(r->headers_out, "Location") != NULL) {
318 +    if (apr_table_get(r->headers_out, "Location") != NULL) {
319          ap_log_rerror(FCGI_LOG_ERR_NOERRNO, r,
320              "FastCGI: FastCgiAccessChecker \"%s\" redirected (not allowed)",
321              dir_config->access_checker);
This page took 0.052804 seconds and 4 git commands to generate.