summaryrefslogtreecommitdiff
path: root/Tools/Scripts/webkitperl/httpd.pm
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-13 12:51:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 20:50:05 +0200
commitd441d6f39bb846989d95bcf5caf387b42414718d (patch)
treee367e64a75991c554930278175d403c072de6bb8 /Tools/Scripts/webkitperl/httpd.pm
parent0060b2994c07842f4c59de64b5e3e430525c4b90 (diff)
downloadqtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Tools/Scripts/webkitperl/httpd.pm')
-rw-r--r--Tools/Scripts/webkitperl/httpd.pm18
1 files changed, 15 insertions, 3 deletions
diff --git a/Tools/Scripts/webkitperl/httpd.pm b/Tools/Scripts/webkitperl/httpd.pm
index 58ff108d3..f61dfa00b 100644
--- a/Tools/Scripts/webkitperl/httpd.pm
+++ b/Tools/Scripts/webkitperl/httpd.pm
@@ -90,6 +90,14 @@ sub hasHTTPD
return system(@command) == 0;
}
+sub getApacheVersion
+{
+ my $httpdPath = getHTTPDPath();
+ my $version = `$httpdPath -v`;
+ $version =~ s/.*Server version: Apache\/(\d+\.\d+).*/$1/s;
+ return $version;
+}
+
sub getDefaultConfigForTestDirectory
{
my ($testDirectory) = @_;
@@ -112,11 +120,14 @@ sub getDefaultConfigForTestDirectory
"-c", "TypesConfig \"$typesConfig\"",
# Apache wouldn't run CGIs with permissions==700 otherwise
"-c", "User \"#$<\"",
- "-c", "LockFile \"$httpdLockFile\"",
"-c", "PidFile \"$httpdPidFile\"",
"-c", "ScoreBoardFile \"$httpdScoreBoardFile\"",
);
+ if (getApacheVersion() eq "2.2") {
+ push(@httpdArgs, "-c", "LockFile \"$httpdLockFile\"");
+ }
+
# FIXME: Enable this on Windows once <rdar://problem/5345985> is fixed
# The version of Apache we use with Cygwin does not support SSL
my $sslCertificate = "$testDirectory/http/conf/webkit-httpd.pem";
@@ -134,6 +145,7 @@ sub getHTTPDConfigPathForTestDirectory
my $httpdConfig;
my $httpdPath = getHTTPDPath();
my $httpdConfDirectory = "$testDirectory/http/conf/";
+ my $apacheVersion = getApacheVersion();
if (isCygwin()) {
my $libPHP4DllPath = "/usr/lib/apache/libphp4.dll";
@@ -144,9 +156,9 @@ sub getHTTPDConfigPathForTestDirectory
}
$httpdConfig = "cygwin-httpd.conf"; # This is an apache 1.3 config.
} elsif (isDebianBased()) {
- $httpdConfig = "apache2-debian-httpd.conf";
+ $httpdConfig = "debian-httpd-$apacheVersion.conf";
} elsif (isFedoraBased()) {
- $httpdConfig = "fedora-httpd.conf"; # This is an apache2 config, despite the name.
+ $httpdConfig = "fedora-httpd-$apacheVersion.conf";
} else {
# All other ports use apache2, so just use our default apache2 config.
$httpdConfig = "apache2-httpd.conf";