httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r373269 - /httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c
Date Sun, 29 Jan 2006 01:19:52 GMT
Author: rooneg
Date: Sat Jan 28 17:19:47 2006
New Revision: 373269

URL: http://svn.apache.org/viewcvs?rev=373269&view=rev
Log:
Now that the dispatch function handles the entire request there's no need
to create a long lived pool, we can use one that's local to the function.

* modules/proxy/mod_proxy_fcgi.c
  (proxy_fcgi_baton_t): Removed.
  (dispatch): Use a local setaside pool instead of one from the baton.
  (proxy_fcgi_handler): Don't bother creating a baton.

Modified:
    httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c

Modified: httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c?rev=373269&r1=373268&r2=373269&view=diff
==============================================================================
--- httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c (original)
+++ httpd/httpd/branches/fcgi-proxy-dev/modules/proxy/mod_proxy_fcgi.c Sat Jan 28 17:19:47
2006
@@ -420,10 +420,6 @@
     return 0;
 }
 
-typedef struct {
-    apr_pool_t *scratch_pool;
-} proxy_fcgi_baton_t;
-
 static void dump_header_to_log(request_rec *r, unsigned char fheader[],
                                apr_size_t length)
 {
@@ -489,7 +485,6 @@
 {
     apr_bucket_brigade *ib, *ob;
     int seen_end_of_headers = 0, done = 0;
-    proxy_fcgi_baton_t *pfb = conn->data;
     apr_status_t rv = APR_SUCCESS;
     conn_rec *c = r->connection;
     struct iovec vec[2];
@@ -497,6 +492,9 @@
     unsigned char farray[FCGI_HEADER_LEN];
     apr_pollfd_t pfd;
     int header_state = HDR_STATE_READING_HEADERS;
+    apr_pool_t *setaside_pool;
+
+    apr_pool_create(&setaside_pool, r->pool);
 
     pfd.desc_type = APR_POLL_SOCKET;
     pfd.desc.s = conn->sock;
@@ -672,7 +670,7 @@
 
                             apr_brigade_cleanup(ob);
 
-                            apr_pool_clear(pfb->scratch_pool);
+                            apr_pool_clear(setaside_pool);
                         }
                         else if (st == -1) {
                             rv = APR_EINVAL;
@@ -682,7 +680,7 @@
                             /* We're still looking for the end of the
                              * headers, so this part of the data will need
                              * to persist. */
-                            apr_bucket_setaside(b, pfb->scratch_pool);
+                            apr_bucket_setaside(b, setaside_pool);
                         }
                     }
 
@@ -847,14 +845,6 @@
                 ap_proxy_release_connection(FCGI_SCHEME, backend, r->server);
             }
             return status;
-        }
-
-        {
-            proxy_fcgi_baton_t *pfb = apr_pcalloc(r->pool, sizeof(*pfb));
-
-            apr_pool_create(&pfb->scratch_pool, r->pool);
-
-            backend->data = pfb;
         }
     }
 



Mime
View raw message