From af44b7b8df5bcb9bb304e36ffad9b65c6ee22594 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 22 Oct 2012 20:15:49 +0200 Subject: tests: add support for Apache 2.4 --- tests/Makefile.am | 26 ++++- tests/httpd.conf.22.in | 293 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/httpd.conf.24.in | 278 ++++++++++++++++++++++++++++++++++++++++++++++ tests/httpd.conf.in | 293 ------------------------------------------------- tests/range-test.c | 13 ++- 5 files changed, 603 insertions(+), 300 deletions(-) create mode 100644 tests/httpd.conf.22.in create mode 100644 tests/httpd.conf.24.in delete mode 100644 tests/httpd.conf.in (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am index 085a81b3..54ce7bdb 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -89,10 +89,29 @@ endif if HAVE_CURL CURL_TESTS = forms-test server-auth-test endif -if HAVE_XMLRPC_EPI_PHP +if HAVE_XMLRPC_PHP XMLRPC_TESTS = xmlrpc-test xmlrpc-server-test endif +if HAVE_APACHE +if HAVE_APACHE_2_2 +httpd_conf_in = httpd.conf.22.in +else +httpd_conf_in = httpd.conf.24.in +endif +httpd.conf: $(httpd_conf_in) + $(AM_V_GEN) sed -e 's,[@]srcdir@,$(srcdir),' \ + -e 's,[@]builddir@,$(builddir),' \ + -e 's,[@]APACHE_MODULE_DIR@,$(APACHE_MODULE_DIR),' \ + -e 's,[@]APACHE_PHP_MODULE_DIR@,$(APACHE_PHP_MODULE_DIR),' \ + -e 's,[@]APACHE_PHP_MODULE@,$(APACHE_PHP_MODULE),' \ + -e 's,[@]IF_HAVE_PHP@,$(IF_HAVE_PHP),' \ + -e 's,[@]APACHE_SSL_MODULE_DIR@,$(APACHE_SSL_MODULE_DIR),' \ + $< > $@ || rm -f $@ + +BUILT_SOURCES = httpd.conf +endif + soup-tests.gresource: soup-tests.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/soup-tests.gresource.xml) $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) $< @@ -138,7 +157,8 @@ RESOURCES = \ EXTRA_DIST = \ htdigest \ htpasswd \ - httpd.conf.in \ + httpd.conf.22.in \ + httpd.conf.24.in \ index.txt \ libsoup.supp \ soup-tests.gresource.xml \ @@ -147,7 +167,7 @@ EXTRA_DIST = \ xmlrpc-server.php \ $(RESOURCES) -DISTCLEANFILES = soup-tests.gresource +DISTCLEANFILES = soup-tests.gresource httpd.conf if MISSING_REGRESSION_TEST_PACKAGES check-local: check-TESTS diff --git a/tests/httpd.conf.22.in b/tests/httpd.conf.22.in new file mode 100644 index 00000000..de0b75fa --- /dev/null +++ b/tests/httpd.conf.22.in @@ -0,0 +1,293 @@ +# http.conf used for testing auth-test + +ServerName 127.0.0.1 +Listen 127.0.0.1:47524 + +PidFile @builddir@/httpd.pid +DocumentRoot @srcdir@ + +# The tests shut down apache with "graceful-stop", because that makes +# it close its listening socket right away. But it seems to sometimes +# result in apache never fully exiting. This fixes that. +GracefulShutdownTimeout 1 + +# Change this to "./error.log" if it's failing and you don't know why +ErrorLog /dev/null + +LoadModule alias_module @APACHE_MODULE_DIR@/mod_alias.so +LoadModule auth_basic_module @APACHE_MODULE_DIR@/mod_auth_basic.so +LoadModule auth_digest_module @APACHE_MODULE_DIR@/mod_auth_digest.so +LoadModule authn_file_module @APACHE_MODULE_DIR@/mod_authn_file.so +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@/@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 index.txt +TypesConfig /dev/null +AddType application/x-httpd-php .php +Redirect permanent /redirected /index.txt + +# Proxy #1: unauthenticated +Listen 127.0.0.1:47526 + + ProxyRequests On + AllowCONNECT 47525 + + # Deny proxying by default + + Order Deny,Allow + Deny from all + + + # Allow local http connections + + Order Allow,Deny + Allow from all + + + # Allow CONNECT to local https port + + Order Allow,Deny + Allow from all + + + # Deny non-proxy requests + + Order Deny,Allow + Deny from all + + + +# Proxy #2: authenticated +Listen 127.0.0.1:47527 + + ProxyRequests On + AllowCONNECT 47525 + + # Deny proxying by default + + Order Deny,Allow + Deny from all + + + # Allow local http connections with authentication + + Order Allow,Deny + Allow from all + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require valid-user + + + # Allow CONNECT to local https port with authentication + + Order Allow,Deny + Allow from all + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require valid-user + + + # Fail non-proxy requests + + Order Deny,Allow + Deny from all + + + +# Proxy #3: unauthenticatable-to +Listen 127.0.0.1:47528 + + ProxyRequests On + AllowCONNECT 47525 + + # Deny proxying by default + + Order Deny,Allow + Deny from all + + + # Allow local http connections with authentication + + Order Allow,Deny + Allow from all + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require user no-such-user + + + # Allow CONNECT to local https port with authentication + + Order Allow,Deny + Allow from all + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require user no-such-user + + + # Fail non-proxy requests + + Order Deny,Allow + Deny from all + + + + +# SSL setup + + Listen 127.0.0.1:47525 + + + SSLEngine on + + SSLCertificateFile @srcdir@/test-cert.pem + SSLCertificateKeyFile @srcdir@/test-key.pem + + + + + +# Basic auth tests +Alias /Basic/realm1/realm2/realm1 @srcdir@ +Alias /Basic/realm1/realm2 @srcdir@ +Alias /Basic/realm1/subdir @srcdir@ +Alias /Basic/realm1/not @srcdir@ +Alias /Basic/realm1 @srcdir@ +Alias /Basic/realm12/subdir @srcdir@ +Alias /Basic/realm12 @srcdir@ +Alias /Basic/realm2 @srcdir@ +Alias /Basic/realm3 @srcdir@ +Alias /Basic @srcdir@ + + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require user user1 + + + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require user user2 + + + + AuthType Basic + AuthName realm12 + AuthUserFile @srcdir@/htpasswd + Require user user1 user2 + + + + AuthType Basic + AuthName realm2 + AuthUserFile @srcdir@/htpasswd + Require user user2 + + + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require user user1 + + + + AuthType Basic + AuthName realm2 + AuthUserFile @srcdir@/htpasswd + Require user user2 + + + + AuthType Basic + AuthName realm3 + AuthUserFile @srcdir@/htpasswd + Require user user3 + + +# Digest auth tests +Alias /Digest/realm1/realm2/realm1 @srcdir@ +Alias /Digest/realm1/realm2 @srcdir@ +Alias /Digest/realm1/subdir @srcdir@ +Alias /Digest/realm1/expire @srcdir@ +Alias /Digest/realm1/not @srcdir@ +Alias /Digest/realm1 @srcdir@ +Alias /Digest/realm2 @srcdir@ +Alias /Digest/realm3 @srcdir@ +Alias /Digest @srcdir@ + + + AuthType Digest + AuthName realm1 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 + Require valid-user + + + + AuthType Digest + AuthName realm1 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 + AuthDigestNonceLifetime 2 + Require valid-user + + + + AuthType Digest + AuthName realm1 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 + Require user user2 + + + + AuthType Digest + AuthName realm2 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2 + Require valid-user + + + + AuthType Digest + AuthName realm1 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 + Require valid-user + + + + AuthType Digest + AuthName realm2 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2 + Require valid-user + + + + AuthType Digest + AuthName realm3 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm3 + Require valid-user + # test RFC2069-style Digest + AuthDigestQop none + diff --git a/tests/httpd.conf.24.in b/tests/httpd.conf.24.in new file mode 100644 index 00000000..2407ad75 --- /dev/null +++ b/tests/httpd.conf.24.in @@ -0,0 +1,278 @@ +# http.conf used for testing auth-test + +ServerName 127.0.0.1 +Listen 127.0.0.1:47524 + +PidFile @builddir@/httpd.pid +DefaultRuntimeDir @builddir@ +DocumentRoot @srcdir@ + +# The tests shut down apache with "graceful-stop", because that makes +# it close its listening socket right away. But it seems to sometimes +# result in apache never fully exiting. This fixes that. +GracefulShutdownTimeout 1 + +# Change this to "./error.log" if it's failing and you don't know why +ErrorLog /dev/null + +LoadModule mpm_prefork_module @APACHE_MODULE_DIR@/mod_mpm_prefork.so +LoadModule alias_module @APACHE_MODULE_DIR@/mod_alias.so +LoadModule auth_basic_module @APACHE_MODULE_DIR@/mod_auth_basic.so +LoadModule auth_digest_module @APACHE_MODULE_DIR@/mod_auth_digest.so +LoadModule authn_core_module @APACHE_MODULE_DIR@/mod_authn_core.so +LoadModule authn_file_module @APACHE_MODULE_DIR@/mod_authn_file.so +LoadModule authz_core_module @APACHE_MODULE_DIR@/mod_authz_core.so +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@/@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 +LoadModule unixd_module @APACHE_SSL_MODULE_DIR@/mod_unixd.so + +DirectoryIndex index.txt +TypesConfig /dev/null +AddType application/x-httpd-php .php +Redirect permanent /redirected /index.txt + +# Proxy #1: unauthenticated +Listen 127.0.0.1:47526 + + ProxyRequests On + AllowCONNECT 47525 + + # Deny proxying by default + + Require all denied + + + # Allow local http connections + + Require all granted + + + # Allow CONNECT to local https port + + Require all granted + + + # Deny non-proxy requests + + Require all denied + + + +# Proxy #2: authenticated +Listen 127.0.0.1:47527 + + ProxyRequests On + AllowCONNECT 47525 + + # Deny proxying by default + + Require all denied + + + # Allow local http connections with authentication + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require valid-user + + + # Allow CONNECT to local https port with authentication + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require valid-user + + + # Fail non-proxy requests + + Require all denied + + + +# Proxy #3: unauthenticatable-to +Listen 127.0.0.1:47528 + + ProxyRequests On + AllowCONNECT 47525 + + # Deny proxying by default + + Require all denied + + + # Allow local http connections with authentication + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require user no-such-user + + + # Allow CONNECT to local https port with authentication + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require user no-such-user + + + # Fail non-proxy requests + + Require all denied + + + + +# SSL setup + + Listen 127.0.0.1:47525 + + + SSLEngine on + + SSLCertificateFile @srcdir@/test-cert.pem + SSLCertificateKeyFile @srcdir@/test-key.pem + + + + + +# Basic auth tests +Alias /Basic/realm1/realm2/realm1 @srcdir@ +Alias /Basic/realm1/realm2 @srcdir@ +Alias /Basic/realm1/subdir @srcdir@ +Alias /Basic/realm1/not @srcdir@ +Alias /Basic/realm1 @srcdir@ +Alias /Basic/realm12/subdir @srcdir@ +Alias /Basic/realm12 @srcdir@ +Alias /Basic/realm2 @srcdir@ +Alias /Basic/realm3 @srcdir@ +Alias /Basic @srcdir@ + + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require user user1 + + + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require user user2 + + + + AuthType Basic + AuthName realm12 + AuthUserFile @srcdir@/htpasswd + Require user user1 user2 + + + + AuthType Basic + AuthName realm2 + AuthUserFile @srcdir@/htpasswd + Require user user2 + + + + AuthType Basic + AuthName realm1 + AuthUserFile @srcdir@/htpasswd + Require user user1 + + + + AuthType Basic + AuthName realm2 + AuthUserFile @srcdir@/htpasswd + Require user user2 + + + + AuthType Basic + AuthName realm3 + AuthUserFile @srcdir@/htpasswd + Require user user3 + + +# Digest auth tests +Alias /Digest/realm1/realm2/realm1 @srcdir@ +Alias /Digest/realm1/realm2 @srcdir@ +Alias /Digest/realm1/subdir @srcdir@ +Alias /Digest/realm1/expire @srcdir@ +Alias /Digest/realm1/not @srcdir@ +Alias /Digest/realm1 @srcdir@ +Alias /Digest/realm2 @srcdir@ +Alias /Digest/realm3 @srcdir@ +Alias /Digest @srcdir@ + + + AuthType Digest + AuthName realm1 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 + Require valid-user + + + + AuthType Digest + AuthName realm1 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 + AuthDigestNonceLifetime 2 + Require valid-user + + + + AuthType Digest + AuthName realm1 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 + Require user user2 + + + + AuthType Digest + AuthName realm2 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2 + Require valid-user + + + + AuthType Digest + AuthName realm1 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 + Require valid-user + + + + AuthType Digest + AuthName realm2 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2 + Require valid-user + + + + AuthType Digest + AuthName realm3 + AuthUserFile @srcdir@/htdigest + AuthDigestDomain /Digest/realm3 + Require valid-user + # test RFC2069-style Digest + AuthDigestQop none + diff --git a/tests/httpd.conf.in b/tests/httpd.conf.in deleted file mode 100644 index de0b75fa..00000000 --- a/tests/httpd.conf.in +++ /dev/null @@ -1,293 +0,0 @@ -# http.conf used for testing auth-test - -ServerName 127.0.0.1 -Listen 127.0.0.1:47524 - -PidFile @builddir@/httpd.pid -DocumentRoot @srcdir@ - -# The tests shut down apache with "graceful-stop", because that makes -# it close its listening socket right away. But it seems to sometimes -# result in apache never fully exiting. This fixes that. -GracefulShutdownTimeout 1 - -# Change this to "./error.log" if it's failing and you don't know why -ErrorLog /dev/null - -LoadModule alias_module @APACHE_MODULE_DIR@/mod_alias.so -LoadModule auth_basic_module @APACHE_MODULE_DIR@/mod_auth_basic.so -LoadModule auth_digest_module @APACHE_MODULE_DIR@/mod_auth_digest.so -LoadModule authn_file_module @APACHE_MODULE_DIR@/mod_authn_file.so -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@/@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 index.txt -TypesConfig /dev/null -AddType application/x-httpd-php .php -Redirect permanent /redirected /index.txt - -# Proxy #1: unauthenticated -Listen 127.0.0.1:47526 - - ProxyRequests On - AllowCONNECT 47525 - - # Deny proxying by default - - Order Deny,Allow - Deny from all - - - # Allow local http connections - - Order Allow,Deny - Allow from all - - - # Allow CONNECT to local https port - - Order Allow,Deny - Allow from all - - - # Deny non-proxy requests - - Order Deny,Allow - Deny from all - - - -# Proxy #2: authenticated -Listen 127.0.0.1:47527 - - ProxyRequests On - AllowCONNECT 47525 - - # Deny proxying by default - - Order Deny,Allow - Deny from all - - - # Allow local http connections with authentication - - Order Allow,Deny - Allow from all - - AuthType Basic - AuthName realm1 - AuthUserFile @srcdir@/htpasswd - Require valid-user - - - # Allow CONNECT to local https port with authentication - - Order Allow,Deny - Allow from all - - AuthType Basic - AuthName realm1 - AuthUserFile @srcdir@/htpasswd - Require valid-user - - - # Fail non-proxy requests - - Order Deny,Allow - Deny from all - - - -# Proxy #3: unauthenticatable-to -Listen 127.0.0.1:47528 - - ProxyRequests On - AllowCONNECT 47525 - - # Deny proxying by default - - Order Deny,Allow - Deny from all - - - # Allow local http connections with authentication - - Order Allow,Deny - Allow from all - - AuthType Basic - AuthName realm1 - AuthUserFile @srcdir@/htpasswd - Require user no-such-user - - - # Allow CONNECT to local https port with authentication - - Order Allow,Deny - Allow from all - - AuthType Basic - AuthName realm1 - AuthUserFile @srcdir@/htpasswd - Require user no-such-user - - - # Fail non-proxy requests - - Order Deny,Allow - Deny from all - - - - -# SSL setup - - Listen 127.0.0.1:47525 - - - SSLEngine on - - SSLCertificateFile @srcdir@/test-cert.pem - SSLCertificateKeyFile @srcdir@/test-key.pem - - - - - -# Basic auth tests -Alias /Basic/realm1/realm2/realm1 @srcdir@ -Alias /Basic/realm1/realm2 @srcdir@ -Alias /Basic/realm1/subdir @srcdir@ -Alias /Basic/realm1/not @srcdir@ -Alias /Basic/realm1 @srcdir@ -Alias /Basic/realm12/subdir @srcdir@ -Alias /Basic/realm12 @srcdir@ -Alias /Basic/realm2 @srcdir@ -Alias /Basic/realm3 @srcdir@ -Alias /Basic @srcdir@ - - - AuthType Basic - AuthName realm1 - AuthUserFile @srcdir@/htpasswd - Require user user1 - - - - AuthType Basic - AuthName realm1 - AuthUserFile @srcdir@/htpasswd - Require user user2 - - - - AuthType Basic - AuthName realm12 - AuthUserFile @srcdir@/htpasswd - Require user user1 user2 - - - - AuthType Basic - AuthName realm2 - AuthUserFile @srcdir@/htpasswd - Require user user2 - - - - AuthType Basic - AuthName realm1 - AuthUserFile @srcdir@/htpasswd - Require user user1 - - - - AuthType Basic - AuthName realm2 - AuthUserFile @srcdir@/htpasswd - Require user user2 - - - - AuthType Basic - AuthName realm3 - AuthUserFile @srcdir@/htpasswd - Require user user3 - - -# Digest auth tests -Alias /Digest/realm1/realm2/realm1 @srcdir@ -Alias /Digest/realm1/realm2 @srcdir@ -Alias /Digest/realm1/subdir @srcdir@ -Alias /Digest/realm1/expire @srcdir@ -Alias /Digest/realm1/not @srcdir@ -Alias /Digest/realm1 @srcdir@ -Alias /Digest/realm2 @srcdir@ -Alias /Digest/realm3 @srcdir@ -Alias /Digest @srcdir@ - - - AuthType Digest - AuthName realm1 - AuthUserFile @srcdir@/htdigest - AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 - Require valid-user - - - - AuthType Digest - AuthName realm1 - AuthUserFile @srcdir@/htdigest - AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 - AuthDigestNonceLifetime 2 - Require valid-user - - - - AuthType Digest - AuthName realm1 - AuthUserFile @srcdir@/htdigest - AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 - Require user user2 - - - - AuthType Digest - AuthName realm2 - AuthUserFile @srcdir@/htdigest - AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2 - Require valid-user - - - - AuthType Digest - AuthName realm1 - AuthUserFile @srcdir@/htdigest - AuthDigestDomain /Digest/realm1 /Digest/realm1/realm2/realm1 - Require valid-user - - - - AuthType Digest - AuthName realm2 - AuthUserFile @srcdir@/htdigest - AuthDigestDomain /Digest/realm2 /Digest/realm1/realm2 - Require valid-user - - - - AuthType Digest - AuthName realm3 - AuthUserFile @srcdir@/htdigest - AuthDigestDomain /Digest/realm3 - Require valid-user - # test RFC2069-style Digest - AuthDigestQop none - diff --git a/tests/range-test.c b/tests/range-test.c index 98f56450..09e95f12 100644 --- a/tests/range-test.c +++ b/tests/range-test.c @@ -229,7 +229,8 @@ request_triple_range (SoupSession *session, const char *uri, } static void -do_range_test (SoupSession *session, const char *uri, gboolean expect_coalesce) +do_range_test (SoupSession *session, const char *uri, + gboolean expect_coalesce, gboolean expect_partial_coalesce) { int twelfths = full_response->length / 12; @@ -309,7 +310,7 @@ do_range_test (SoupSession *session, const char *uri, gboolean expect_coalesce) 9 * twelfths, 10 * twelfths + 5, 4 * twelfths, 5 * twelfths, 10 * twelfths - 5, 11 * twelfths, - expect_coalesce ? 2 : 3); + expect_partial_coalesce ? 2 : 3); if (memcmp (full_response->data, test_response, full_response->length) != 0) { debug_printf (1, "\nfull_response and test_response don't match\n"); @@ -346,14 +347,18 @@ main (int argc, char **argv) session = soup_test_session_new (SOUP_TYPE_SESSION_ASYNC, NULL); debug_printf (1, "1. Testing against apache\n"); - do_range_test (session, "http://127.0.0.1:47524/", FALSE); +#if HAVE_APACHE_2_2 + do_range_test (session, "http://127.0.0.1:47524/", FALSE, FALSE); +#else + do_range_test (session, "http://127.0.0.1:47524/", TRUE, FALSE); +#endif debug_printf (1, "\n2. Testing against SoupServer\n"); server = soup_test_server_new (FALSE); soup_server_add_handler (server, NULL, server_handler, NULL, NULL); base_uri = g_strdup_printf ("http://127.0.0.1:%u/", soup_server_get_port (server)); - do_range_test (session, base_uri, TRUE); + do_range_test (session, base_uri, TRUE, TRUE); g_free (base_uri); soup_test_server_quit_unref (server); -- cgit v1.2.3