+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):
[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
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
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
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
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
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);
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);
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;
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);