avoid leading and trailing quotes. If an exact match is not found, lookup
authorAlex Graveley <alex@ximian.com>
Tue, 13 Mar 2001 04:01:53 +0000 (04:01 +0000)
committeralex <alex>
Tue, 13 Mar 2001 04:01:53 +0000 (04:01 +0000)
2001-03-12  Alex Graveley  <alex@ximian.com>

* src/soup-core/soup-server.c (soup_server_get_handler): avoid
leading and trailing quotes. If an exact match is not found,
lookup based only on methodname not uri#methodnmae.

* src/soup-core/soup-apache.c (soup_apache_handler): compile
without warnings.

* configure.in (AC_OUTPUT): chmod +x soup_apacheConf.sh

ChangeLog
configure.in
libsoup/soup-server.c

index 68ce741..017ac80 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2001-03-12  Alex Graveley  <alex@ximian.com>
+
+       * src/soup-core/soup-server.c (soup_server_get_handler): avoid
+       leading and trailing quotes. If an exact match is not found,
+       lookup based only on methodname not uri#methodnmae.
+
+       * src/soup-core/soup-apache.c (soup_apache_handler): compile
+       without warnings.
+
+       * configure.in (AC_OUTPUT): chmod +x soup_apacheConf.sh
+
 2001-03-09  Alex Graveley  <alex@ximian.com>
 
        * src/soup-wsdl/wsdl-parse.c (wsdl_parse): set definitions = NULL
index 7393248..5da5898 100644 (file)
@@ -245,7 +245,7 @@ AC_OUTPUT([
        src/soup-wsdl/Makefile
        tests/Makefile
        ],
-       [chmod +x soup-config soupConf.sh])
+       [chmod +x soup-config soupConf.sh soup_apacheConf.sh])
 
 echo "
 
index d97edb3..32d0494 100644 (file)
@@ -26,15 +26,39 @@ static gint                   soup_server_global_auth_allowed_types = 0;
 SoupServerHandler *
 soup_server_get_handler (const gchar *methodname)
 {
-       GSList *iter = soup_server_handlers;
+       GSList *iter;
+       gchar *name;
+       gint len;
 
        g_return_val_if_fail (methodname != NULL, NULL);
 
+       name = g_strdup (methodname);
+       g_strstrip (name);
+       len = strlen (name);
+
+       /* Strip quotes */
+       if (name [0] == '"' && name [len] == '"') {
+               name [len--] = '\0';
+               name++;
+       }
+
+ RETRY_MATCH:
        for (iter = soup_server_handlers; iter; iter = iter->next) {
                SoupServerHandler *hand = iter->data;
-               if (!strcmp (hand->methodname, methodname))
+               if (!strcmp (hand->methodname, name)) {
+                       g_free (name);
                        return hand;
+               }
        }
+
+       /* Try again without the URI */
+       methodname = strchr (name, '#');
+       if (methodname && strlen (name) > 1) {
+               name++;
+               goto RETRY_MATCH;
+       }
+
+       g_free (name);
        return NULL;
 }