Make "make check" pass on Fedora 7:
authorDan Winship <danw@src.gnome.org>
Fri, 14 Sep 2007 19:50:23 +0000 (19:50 +0000)
committerDan Winship <danw@src.gnome.org>
Fri, 14 Sep 2007 19:50:23 +0000 (19:50 +0000)
* configure.in: update apache/php tests with additional filenames

* tests/httpd.conf.in: updates for configure.in changes and
slightly-more-recent apache

* tests/ssl-test.c (start_writing): fix uninitialized struct field
(main): start server after setting up client since otherwise
there's a race condition since soup_gnutls_init() isn't actually
thread-safe. (FIXME)

* tests/xmlrpc-server.php: rewrite to not use $HTTP_RAW_POST_DATA
(which only exists if register_globals is set)

svn path=/trunk/; revision=929

ChangeLog
configure.in
tests/httpd.conf.in
tests/ssl-test.c
tests/xmlrpc-server.php

index 254a43f..008ef8a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2007-09-14  Dan Winship  <danw@gnome.org>
+
+       Make "make check" pass on Fedora 7:
+
+       * configure.in: update apache/php tests with additional filenames
+
+       * tests/httpd.conf.in: updates for configure.in changes and
+       slightly-more-recent apache
+
+       * tests/ssl-test.c (start_writing): fix uninitialized struct field
+       (main): start server after setting up client since otherwise
+       there's a race condition since soup_gnutls_init() isn't actually
+       thread-safe. (FIXME)
+
+       * tests/xmlrpc-server.php: rewrite to not use $HTTP_RAW_POST_DATA
+       (which only exists if register_globals is set)
+
 2007-06-01  Dan Winship  <danw@novell.com>
 
        * libsoup/soup-message-filter.h (SOUP_IS_MESSAGE_FILTER_CLASS):
index 61f336d..757991c 100644 (file)
@@ -214,7 +214,7 @@ if test "$APACHE_HTTPD" != "no"; then
                [apache_prefix=`dirname \`dirname $APACHE_HTTPD\``
                mpm=`$APACHE_HTTPD -V | sed -ne 's/^Server MPM: */-/p' | tr 'A-Z' 'a-z'`
                # This only works with bash, but should fail harmlessly in sh
-               for dir in $apache_prefix/lib{64,}/{apache,http}{2,}{$mpm,}{/modules,}; do
+               for dir in $apache_prefix/lib{64,}/{apache,apache2,http,http2,httpd}{$mpm,}{/modules,}; do
                    if test -f $dir/mod_auth_digest.so; then
                        APACHE_MODULE_DIR="$dir"
                    fi
@@ -223,12 +223,18 @@ if test "$APACHE_HTTPD" != "no"; then
                    fi
                    if test -f $dir/mod_php5.so; then
                        APACHE_PHP_MODULE_DIR="$dir"
+                       APACHE_PHP_MODULE=mod_php5.so
+                   fi
+                   if test -f $dir/libphp5.so; then
+                       APACHE_PHP_MODULE_DIR="$dir"
+                       APACHE_PHP_MODULE=libphp5.so
                    fi
                done])
     AC_MSG_RESULT($APACHE_MODULE_DIR)
     AC_SUBST(APACHE_MODULE_DIR)
     AC_SUBST(APACHE_SSL_MODULE_DIR)
     AC_SUBST(APACHE_PHP_MODULE_DIR)
+    AC_SUBST(APACHE_PHP_MODULE)
 fi
 
 if test "$APACHE_HTTPD" != "no" -a -n "$APACHE_MODULE_DIR"; then
@@ -240,8 +246,10 @@ fi
 AM_CONDITIONAL(HAVE_APACHE, test $have_apache = 1)
 
 if test "$have_apache" = 1; then
-    AC_MSG_CHECKING([for mod_php5])
-    if test -f $APACHE_PHP_MODULE_DIR/mod_php5.so; then
+    AC_CHECK_PROGS(PHP, php php5)
+
+    AC_MSG_CHECKING([for Apache PHP module])
+    if test -f $APACHE_PHP_MODULE_DIR/$APACHE_PHP_MODULE; then
        have_php=yes
        IF_HAVE_PHP=""
     else
@@ -252,7 +260,7 @@ if test "$have_apache" = 1; then
 
     if test "$have_php" = yes; then
        AC_MSG_CHECKING([for xmlrpc-epi-php])
-       if php5 --rf xmlrpc_server_create | grep -q "does not exist"; then
+       if $PHP --rf xmlrpc_server_create | grep -q "does not exist"; then
            have_xmlrpc_epi_php=no
        else
            have_xmlrpc_epi_php=yes
index c5a8b1f..202ade3 100644 (file)
@@ -22,13 +22,14 @@ LoadModule authz_host_module    @APACHE_MODULE_DIR@/mod_authz_host.so
 LoadModule authz_user_module    @APACHE_MODULE_DIR@/mod_authz_user.so
 LoadModule dir_module           @APACHE_MODULE_DIR@/mod_dir.so
 LoadModule mime_module          @APACHE_MODULE_DIR@/mod_mime.so
-@IF_HAVE_PHP@LoadModule php5_module          @APACHE_PHP_MODULE_DIR@/mod_php5.so
+@IF_HAVE_PHP@LoadModule php5_module          @APACHE_PHP_MODULE_DIR@/@APACHE_PHP_MODULE@
 LoadModule proxy_module         @APACHE_MODULE_DIR@/mod_proxy.so
 LoadModule proxy_http_module    @APACHE_MODULE_DIR@/mod_proxy_http.so
 LoadModule proxy_connect_module @APACHE_MODULE_DIR@/mod_proxy_connect.so
 LoadModule ssl_module           @APACHE_SSL_MODULE_DIR@/mod_ssl.so
 
 DirectoryIndex httpd.pid
+TypesConfig /dev/null
 AddType application/x-httpd-php .php
 
 
index c9961d2..be6ea8a 100644 (file)
@@ -183,6 +183,7 @@ start_writing (gpointer user_data)
        data = g_new (AsyncData, 1);
        for (i = 0; i < BUFSIZE; i++)
                data->writebuf[i] = i & 0xFF;
+       data->total = 0;
 
        g_signal_connect (sock, "writable",
                          G_CALLBACK (async_write), data);
@@ -264,11 +265,7 @@ main (int argc, char **argv)
        getsockname (listener, (struct sockaddr *)&sin, (void *)&sin_len);
        port = ntohs (sin.sin_port);
 
-       /* Now spawn server thread */
-       server = g_thread_create (server_thread, GINT_TO_POINTER (listener),
-                                 FALSE, NULL);
-
-       /* And create the client */
+       /* Create the client */
        sock = soup_socket_client_new_sync ("127.0.0.1", port,
                                            soup_ssl_get_client_credentials (NULL),
                                            &status);
@@ -279,6 +276,10 @@ main (int argc, char **argv)
 
        soup_socket_start_ssl (sock);
 
+       /* Now spawn server thread */
+       server = g_thread_create (server_thread, GINT_TO_POINTER (listener),
+                                 FALSE, NULL);
+
        /* Synchronous client test */
        for (i = 0; i < BUFSIZE; i++)
                writebuf[i] = i & 0xFF;
index cf20948..19d4405 100644 (file)
@@ -66,7 +66,8 @@ xmlrpc_server_register_method($xmlrpc_server, "md5sum", "md5sum");
 xmlrpc_server_register_method($xmlrpc_server, "dateChange", "dateChange");
 xmlrpc_server_register_method($xmlrpc_server, "echo", "echo_");
 
-$response = xmlrpc_server_call_method ($xmlrpc_server, $HTTP_RAW_POST_DATA,
+$response = xmlrpc_server_call_method ($xmlrpc_server,
+                                      implode("\r\n", file('php://input')),
                                       0, array ("output_type" => "xml"));
 echo ($response);