httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r723843 - in /httpd/httpd/trunk: ./ include/ modules/arch/unix/ modules/filters/ modules/proxy/balancers/ modules/wombat/ modules/wombat/docs/ modules/wombat/test/ modules/wombat/test/htdocs/ modules/wombat/test/lib/ server/
Date Fri, 05 Dec 2008 20:09:34 GMT
Author: pquerna
Date: Fri Dec  5 12:09:32 2008
New Revision: 723843

URL: http://svn.apache.org/viewvc?rev=723843&view=rev
Log:
Merge mod_wombat from the wombat branch:
 <https://svn.apache.org/repos/asf/httpd/httpd/branches/wombat-integration>
Into trunk.

Added:
    httpd/httpd/trunk/modules/wombat/   (props changed)
      - copied from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/
    httpd/httpd/trunk/modules/wombat/Makefile.in
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/Makefile.in
    httpd/httpd/trunk/modules/wombat/README
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/README
    httpd/httpd/trunk/modules/wombat/apr_lua.c
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/apr_lua.c
    httpd/httpd/trunk/modules/wombat/apr_lua.h
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/apr_lua.h
    httpd/httpd/trunk/modules/wombat/config.c
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/config.c
    httpd/httpd/trunk/modules/wombat/config.h
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/config.h
    httpd/httpd/trunk/modules/wombat/config.m4
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/config.m4
    httpd/httpd/trunk/modules/wombat/docs/
      - copied from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/docs/
    httpd/httpd/trunk/modules/wombat/docs/README
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/docs/README
    httpd/httpd/trunk/modules/wombat/docs/basic-configuration.txt
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/docs/basic-configuration.txt
    httpd/httpd/trunk/modules/wombat/docs/building-from-subversion.txt
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/docs/building-from-subversion.txt
    httpd/httpd/trunk/modules/wombat/docs/running-developer-tests.txt
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/docs/running-developer-tests.txt
    httpd/httpd/trunk/modules/wombat/docs/writing-handlers.txt
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/docs/writing-handlers.txt
    httpd/httpd/trunk/modules/wombat/mod_wombat.c
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/mod_wombat.c
    httpd/httpd/trunk/modules/wombat/mod_wombat.h
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/mod_wombat.h
    httpd/httpd/trunk/modules/wombat/request.c
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/request.c
    httpd/httpd/trunk/modules/wombat/request.h
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/request.h
    httpd/httpd/trunk/modules/wombat/test/   (props changed)
      - copied from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/
    httpd/httpd/trunk/modules/wombat/test/helpers.lua
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/helpers.lua
    httpd/httpd/trunk/modules/wombat/test/htdocs/
      - copied from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/htdocs/
    httpd/httpd/trunk/modules/wombat/test/htdocs/config_tests.lua
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/htdocs/config_tests.lua
    httpd/httpd/trunk/modules/wombat/test/htdocs/filters.lua
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/htdocs/filters.lua
    httpd/httpd/trunk/modules/wombat/test/htdocs/find_me.txt
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/htdocs/find_me.txt
    httpd/httpd/trunk/modules/wombat/test/htdocs/hooks.lua
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/htdocs/hooks.lua
    httpd/httpd/trunk/modules/wombat/test/htdocs/other.lua
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/htdocs/other.lua
    httpd/httpd/trunk/modules/wombat/test/htdocs/simple.lua
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/htdocs/simple.lua
    httpd/httpd/trunk/modules/wombat/test/htdocs/test.lua
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/htdocs/test.lua
    httpd/httpd/trunk/modules/wombat/test/httpd_config.lua
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/httpd_config.lua
    httpd/httpd/trunk/modules/wombat/test/lib/
      - copied from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/lib/
    httpd/httpd/trunk/modules/wombat/test/lib/kangaroo.lua
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/lib/kangaroo.lua
    httpd/httpd/trunk/modules/wombat/test/moonunit.lua
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/moonunit.lua
    httpd/httpd/trunk/modules/wombat/test/test.lua
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/test.lua
    httpd/httpd/trunk/modules/wombat/test/test_httpd.conf
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/test/test_httpd.conf
    httpd/httpd/trunk/modules/wombat/vmprep.c
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/vmprep.c
    httpd/httpd/trunk/modules/wombat/vmprep.h
      - copied unchanged from r723841, httpd/httpd/branches/wombat-integration/modules/wombat/vmprep.h
Modified:
    httpd/httpd/trunk/   (props changed)
    httpd/httpd/trunk/include/httpd.h
    httpd/httpd/trunk/include/util_script.h
    httpd/httpd/trunk/modules/arch/unix/mod_unixd.c   (props changed)
    httpd/httpd/trunk/modules/filters/NWGNUmodsed   (props changed)
    httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c   (props changed)
    httpd/httpd/trunk/server/util_script.c

Propchange: httpd/httpd/trunk/
------------------------------------------------------------------------------
    svn:mergeinfo = /httpd/httpd/branches/wombat-integration:723609-723841

Modified: httpd/httpd/trunk/include/httpd.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?rev=723843&r1=723842&r2=723843&view=diff
==============================================================================
--- httpd/httpd/trunk/include/httpd.h (original)
+++ httpd/httpd/trunk/include/httpd.h Fri Dec  5 12:09:32 2008
@@ -1005,6 +1005,7 @@
 
     apr_thread_mutex_t *invoke_mtx;
 
+    apr_table_t *body_table;
 /* Things placed at the end of the record to avoid breaking binary
  * compatibility.  It would be nice to remember to reorder the entire
  * record to improve 64bit alignment the next time we need to break

Modified: httpd/httpd/trunk/include/util_script.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/util_script.h?rev=723843&r1=723842&r2=723843&view=diff
==============================================================================
--- httpd/httpd/trunk/include/util_script.h (original)
+++ httpd/httpd/trunk/include/util_script.h Fri Dec  5 12:09:32 2008
@@ -140,6 +140,10 @@
 				       int (*getsfunc) (char *, int, void *),
 				       void *getsfunc_data);
 
+AP_DECLARE(void) ap_args_to_table(request_rec *r, apr_table_t **table);
+
+AP_DECLARE(apr_status_t) ap_body_to_table(request_rec *r, apr_table_t **table);
+    
 #ifdef __cplusplus
 }
 #endif

Propchange: httpd/httpd/trunk/modules/arch/unix/mod_unixd.c
            ('svn:mergeinfo' removed)

Propchange: httpd/httpd/trunk/modules/filters/NWGNUmodsed
            ('svn:mergeinfo' removed)

Propchange: httpd/httpd/trunk/modules/proxy/balancers/mod_lbmethod_heartbeat.c
            ('svn:mergeinfo' removed)

Propchange: httpd/httpd/trunk/modules/wombat/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Dec  5 12:09:32 2008
@@ -0,0 +1,5 @@
+*.slo
+.libs
+.deps
+Makefile
+modules.mk

Propchange: httpd/httpd/trunk/modules/wombat/test/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Dec  5 12:09:32 2008
@@ -0,0 +1,2 @@
+cycle
+httpd.conf

Modified: httpd/httpd/trunk/server/util_script.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_script.c?rev=723843&r1=723842&r2=723843&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_script.c (original)
+++ httpd/httpd/trunk/server/util_script.c Fri Dec  5 12:09:32 2008
@@ -721,3 +721,118 @@
     va_end(strs.args);
     return res;
 }
+
+
+static void
+argstr_to_table(apr_pool_t *p, char *str, apr_table_t *parms)
+{
+    char *key;
+    char *value;
+    char *strtok_state;
+
+    if (str == NULL) {
+        return;
+    }
+    
+    key = apr_strtok(str, "&", &strtok_state);
+    while (key) {
+        value = strchr(key, '=');
+        if (value) {
+            *value = '\0';      /* Split the string in two */
+            value++;            /* Skip passed the = */
+        }
+        else {
+            value = "1";
+        }
+        ap_unescape_url(key);
+        ap_unescape_url(value);
+        apr_table_set(parms, key, value);
+        /*
+         ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+         "Found query arg: %s = %s", key, value);
+         */
+        key = apr_strtok(NULL, "&", &strtok_state);
+    }
+}
+
+AP_DECLARE(void) ap_args_to_table(request_rec *r, apr_table_t **table)
+{
+    apr_table_t *t = apr_table_make(r->pool, 10);
+    argstr_to_table(r->pool, r->args, t);
+    *table = t;
+}
+
+AP_DECLARE(apr_status_t) ap_body_to_table(request_rec *r, apr_table_t **table)
+{
+    apr_bucket_brigade *bb;
+    apr_bucket_brigade *tmpbb;
+    apr_status_t rv = APR_SUCCESS;
+
+    if (r->body_table) {
+        *table = r->body_table;
+        return APR_SUCCESS;
+    }
+    
+    *table = NULL;
+
+    bb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
+    tmpbb = apr_brigade_create(r->pool, r->connection->bucket_alloc);
+
+    do {
+        apr_off_t len;
+
+        rv = ap_get_brigade(r->input_filters, tmpbb, AP_MODE_READBYTES,
+                            APR_BLOCK_READ, AP_IOBUFSIZE);
+        if (rv) {
+            break;
+        }
+
+        rv = apr_brigade_length(tmpbb, 1, &len);
+        if (rv) {
+            break;
+        }
+        
+        if (len == 0) {
+            break;
+        }
+
+        APR_BRIGADE_CONCAT(bb, tmpbb);
+    } while(1);
+
+    if (!rv) {
+        r->body_table = apr_table_make(r->pool, 10);
+        
+        if (!APR_BRIGADE_EMPTY(bb)) {
+            char *buffer;
+            apr_off_t len;
+            apr_pool_t *tpool;
+
+            apr_pool_create(&tpool, r->pool);
+            
+            rv = apr_brigade_length(bb, 1, &len);
+
+            if (!rv) {
+                apr_size_t total;
+                buffer = apr_palloc(tpool, len+1);
+                
+                total = len+1;
+
+                rv = apr_brigade_flatten(bb, buffer, &total);
+
+                buffer[total] = '\0';
+
+                argstr_to_table(r->pool, buffer, r->body_table);
+            }
+            apr_pool_destroy(tpool);
+        }
+    }
+
+    apr_brigade_destroy(bb);
+    apr_brigade_destroy(tmpbb);
+
+    *table = r->body_table;
+
+    return rv;
+}
+
+



Mime
View raw message