[Opensrf-commits] r1337 - trunk/src/gateway

svn at svn.open-ils.org svn at svn.open-ils.org
Thu May 22 15:59:00 EDT 2008


Author: erickson
Date: 2008-05-22 15:58:56 -0400 (Thu, 22 May 2008)
New Revision: 1337

Modified:
   trunk/src/gateway/apachetools.c
Log:
the latest cleanup broke GET requests by essentially ignoring them.  fixed

Modified: trunk/src/gateway/apachetools.c
===================================================================
--- trunk/src/gateway/apachetools.c	2008-05-20 19:47:49 UTC (rev 1336)
+++ trunk/src/gateway/apachetools.c	2008-05-22 19:58:56 UTC (rev 1337)
@@ -6,6 +6,7 @@
 
 	char* arg = NULL;
 	apr_pool_t *p = r->pool;	/* memory pool */
+	growing_buffer* buffer = buffer_init(1025);
 
 	/* gather the post args and append them to the url query string */
 	if( !strcmp(r->method,"POST") ) {
@@ -16,7 +17,6 @@
 
 		if(ap_should_client_block(r)) {
 
-			growing_buffer* buffer = buffer_init(1025);
 
 			/* Start with url query string, if any */
 			
@@ -53,19 +53,21 @@
 			}
 
 			osrfLogDebug(OSRF_LOG_MARK, "gateway done reading post data");
-	
-			if(buffer->n_used > 0)
-				arg = apr_pstrdup(p, buffer->buf);
-			else
-				arg = NULL; 
-
-			buffer_free(buffer);
 		}
-	} 
 
+	} else { /* GET */
 
-	osrfLogDebug(OSRF_LOG_MARK, "gateway done mangling post data");
+        if(r->args && r->args[0])
+            buffer_add(buffer, r->args);
+    }
 
+
+    if(buffer->n_used > 0)
+        arg = apr_pstrdup(p, buffer->buf);
+    else
+        arg = NULL; 
+    buffer_free(buffer);
+
 	if( !arg || !arg[0] ) { /* we received no request */
 		return NULL;
 	}



More information about the opensrf-commits mailing list